>> z247 schrieb:
>> Say I have the following tables;
>> 
>> siteID,name
>> ------------------------------
>> site1, XYZ
>> site2, RSQ
>> 
>> ID,site,data
>> ------------------------
>> 1, site1, M
>> 2, site2, Q
>> 3, site2, Y
>> 4, site1, P 
>> 
>> ... etc.
>> 
>> And I want to create a view like this;
>> 
>> 
>> siteID,name,data
>> ------------------------------
>> site1, XYZ, (M,P)
>> site2, RSQ, (Q,Y)
>> 
>> where all the related column data in the second table is placed in another
>> column. How can I do this? Is there a function that can group these values
>> into one variable or array?
>> 
>> Thank you
> 
> CONCAT_WS(', ',siteID,name,data)

> Barry

To those who responded - read the question.
He wants to combine the values from the data column of *2* rows into one, not 
just a straightforward string concatenation.


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to