tags:

views:

23

answers:

1

I am using a mySQL CONCAT_WS() function to get a set of comma separated values.

I need the output to appear as a set of rows instead of a CSV. How can this be done ?

Thanks, Chak.

+1  A: 
SELECT CONCAT_WS("\n", "row1", "row2", "row3");
> row1
  row2
  row3

Is that what you wanted?

André Laszlo
you can also do stuff like this: CONCAT_WS(char(10 using utf8), "a","s","d") in case you need more control over the type of newlines used.
André Laszlo
The current output with comma as separator is 440fa6a7-a92e-4e8b-8198-d36004c14276, DEMOP, , 2010-08-02, , Haemogram,Blood Group I needed this to appear as440fa6a7-a92e-4e8b-8198-d36004c14276, DEMOP, , 2010-08-02, , Haemogram440fa6a7-a92e-4e8b-8198-d36004c14276, DEMOP, , 2010-08-02, , Blood Group
Chakra
Please edit your question instead. Something ate your newlines. :)
André Laszlo