Code :
UPDATE updated_profiles SET last_updated = b.first_request ,category1 = CASE WHEN (b.category1 IS NULL) THEN a.category1 ELSE b.category1 END ,category1_perc = CASE WHEN (b.category1 IS NULL) THEN a.category1_perc ELSE b.category1_perc END ,category2 = CASE WHEN (b.category1 IS NULL) THEN a.category2 ELSE b.category2 END ,category2_perc = CASE WHEN (b.category1 IS NULL) THEN a.category2_perc ELSE b.category2_perc END ,category3 = CASE WHEN (b.category1 IS NULL) THEN a.category3 ELSE b.category3 END ,category3_perc = CASE WHEN (b.category1 IS NULL) THEN a.category3_perc ELSE b.category3_perc END ...
|