[ciapug] concating columns of strings
Dave J. Hala Jr.
dave at 58ghz.net
Thu May 1 13:50:11 CDT 2008
I'd like to find a way to take a column of strings and concat all the
values. We what I want to do is analogous to summing a numeric column
while grouping.
What I do with the numeric column is:
SELECT SUM(amount) as total FROM mytable GROUP BY vendor
I'd like to do the same thing with a character field. Suppose that the
field has a character value of A,B or C. I'd like the query to return
"ABC" if there are 3 records with those values for each vendor.
Anyone try to do this before? It would appear that the Mysql 4.x concat
function is not built for this. Any thoughts?
:) Dave
--
___
Dave J. Hala Jr.
President OSIS, Inc.
www.osis.us
More information about the ciapug
mailing list