Concat using comma
471326Jul 29 2011 — edited Jul 29 2011Hi,
We have a table XYZ with columns
A B C D E F, we would like to concat all the values of all columns.
so
select A||', '||B||', '||C||', '||D||', '||E||', '||F
FROM XYZ
It works fine, when all the columns are populated. some times certain columns are not populated. so it looks like
,,123,,456
I would like to get rid of the double comma's are just include only the columns which contain data.
How to achieve it.
Thanks