I am trying to concatenate a number of columns and skip the column if column is NULL OR empty in postgres. For example:
SELECT CONCAT(coalesce('a',''),
'|',coalesce('b',''),
'|',coalesce(NULL,''),
'|',coalesce('',''),
'|',coalesce('',''),
'|',coalesce('c','')) AS finalstring;
Output : a|b||||c
Expected output : a|b|c