Concatenate results - grouped by Name

flect

Registered User.
Local time
Tomorrow, 04:02
Joined
Feb 26, 2008
Messages
86
Hi everyone.

i've got a seemingly simple function i'd like to perform with with a query but am unsure how to go about it.

Essentially I want to concatenate results of a query into a single field - grouped by distinct value.

eg - original table

Code:
NAME	VARIETY
Apples	Granny Smith
Apples	Golden Delicious
Apples	Red Delicious
Oranges	Blood
Oranges	Navel
Oranges	Valencia

I want to group by NAME, and have all varieties combined so the result would be:

Code:
NAME	VARIETIES
Apples	Granny Smith, Golden Delicious, Red Delicious
Oranges	Blood, Navel, Valencia

Any ideas? I can't seem to use GROUP BY as i'm not trying to aggregate anything. :confused:
 

Users who are viewing this thread

Back
Top Bottom