Question
Equivalent of ValueList function in SQL
Hi,
Is there an equivalent of valueList function in SQL? Here's what I am trying to do:
Suppose I have the following table:
Name -- Color
******************
John -- Green
John -- Red
Mike -- White
I want to do a query such that the colors are aggregated as a list. So the result would be:
Name -- Color List
***********************
John -- Green, Red
Mike -- White
The only way I could think of doing this is to loop through each name in the table and doing ValueList in each loop. Is there a better way?
Thanks.
Min
Is there an equivalent of valueList function in SQL? Here's what I am trying to do:
Suppose I have the following table:
Name -- Color
******************
John -- Green
John -- Red
Mike -- White
I want to do a query such that the colors are aggregated as a list. So the result would be:
Name -- Color List
***********************
John -- Green, Red
Mike -- White
The only way I could think of doing this is to loop through each name in the table and doing ValueList in each loop. Is there a better way?
Thanks.
Min
