I am trying to update one column if it is null with the values โโof another column, only if this column is also not null. If it is zero, update column 1 with column 3
Here is an example:
day_phone sec_phone alt_phone cell_phone
555-555-1212 NULL NULL NULL
NULL 555-555-1234 NULL NULL
NULL NULL 555-555-4321 NULL
NULL NULL NULL 555-555-5678
NULL 555-123-4567 555-867-5309 NULL
So what I want to do is update all the entries so that the day_phone method ends with a result, preferably the first one that it finds if there are entries in multiple columns. The end result should look like this:
day_phone sec_phone alt_phone cell_phone
555-555-1212 NULL NULL NULL
555-555-1234 555-555-1234 NULL NULL
555-555-4321 NULL 555-555-4321 NULL
555-555-5678 NULL NULL 555-555-5678
555-123-4567 555-123-4567 555-867-5309 NULL
source share