I have a table with m columns and n rows. The ETL tools I
was using wrote an empty (
'') to every cell without a value and I would like
them to be
NULL instead. This got me thinking if it would be
UPDATE every cell with value
'' with a
NULL, in a single statement?
In my table every column happens to be
Col1|Col2|...|Coln Col1|Col2|...|Coln Row1 a '' '' 1 Row1 a NULL NULL 1 Row2 c '' e '' Row2 c NULL e NULL ... --> ... Rown aa f '' 123 Rown aa f NULL 123
Is it possible with SQL? How about PL/pgSQL? I did some googling around but couldn't find anything really relevant.