I am trying to construct a SQL statement that performs the following:
For a specific row of a specific table, for all columns where a value = '{}" , make the value NULL
For example:
table XYZ:
"col_id" "col2" "col3" "col4" "col5"
1234 {} {} PDQ ABC
5678 {DO} {RE} DEF HIJ
5678 {MI} {} ABC PDQ
If I want: for table XYZ, where col_id = 1234, make all columns with value {} null,
the result would be:
"col_id" "col2" "col3" "col4" "col5"
1234 NULL NULL PDQ ABC
5678 {DO} {RE} DEF HIJ
5678 {MI} {} ABC PDQ
Grateful for any assistance. Thank you.
set col2 = case col2 when '{}' then null else col2 end, col3 = case col3 when '{}' then null else col3 end,...