I have 5 columns that I need to query using concat_ws (to make text for kml file that only has one description field and I need info from 5 columns), and in between the concatenated columns I want to add text before two columns:
SELECT concat_ws(' '::text, col1, col2, col3,
'text_for_4:', col4,
'text_for_5:', col5) AS concat_ws,..
This works fine, but can I create a query that will return a text of 'N/A' if a row has a null value? I.e. if col4 is null the return would be 'col1 col2 col3 text_for_4: N/A text_for_5: col5'