
February 28th, 2013, 11:59 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 1
Time spent in forums: 25 m 9 sec
Reputation Power: 0
|
|
|
Cleaning output from string_agg
I am consolidating information from a view using
select
string_agg(mytable.notes::text, ','::text) AS notes,
.
.
.
from mytable, ...
where ...
groupby ...
Unfortunately some of the fields are blank rather than null giving the result "blah,,,,blah,"
How do I check the return for empty (it appears to work well for null) before the aggregation?
Thanks in advance
|