MySQL SQL needed

ibaker

Well-known member
Over the years it seems my data has become fragmented. Initially in XF it wasn't possible to have Custom User Fields so I renamed the Occupation field to Aircraft in the phrases and used that field for users to enter the type of aircraft they had. later when Custom User Fields were introduced I created a specific field for Aircraft.

Now I would like to migrate the entries in the Occupation field over to the Aircraft field and then delete the Occupation field however there are some issues:
1. Some users have entries in both fields
2. Some users have no entries in either fields
3. Some users only have entries in one or the other fields
4. Some users don't even have the Aircraft field listed in the xf_user_field_value table

So I am asking for help on an SQL I can run to fix this and end up only with 1 field of data called Aircraft...can anyone assist, thanks
 
Top Bottom