How to write 2 case statements in single update statement.
update table
set col1 = case when id is null and country = 'USA' and ID2 like '%-%'
then loc1
else 'AB'
end,
col1 = case when country = 'USA'
then NULL
end
from table
Its giving error like cannot col1 is specified more than once in set clause