I have 12 unique IDs in my PostgreSQL 9.5 table for which some array (text) are blanks:
ID(int) my_array(text)
1 1,112,298
2
3 2,114,235,145,126,123,141
.. ..
I am trying to replace these blank rows with '0' in my query but so far failed to do so:
Select
Case when my_tbl.my_array = ' '
then '0'
else my_array
end as array
from my_table
The query runs but no result. Can somebody help to me to replace blanks rows using case statement or otherwise?
my_tbl.my_array = '{}'incaseto check for empty arrays.