I've got a simple LEFT JOIN, where i retrieve the UserID and the ServiceID's
of Services that User needs. Since they are realted through a many-2-many
relationship, I get something like
UserID ServiceID
1 402
1 417
1 533
2 200
2 201
3 {null}
ok, no problem. What I *REALLY* want in the result set is for the ServiceID
to be turned into a list, something like:
UserID ServiceIDs
1 402,417,533
2 200,201
3 {null}
so how can I make SQL do
this for me (esp with the {null})? It's gonna turn out to be something easy
that I've seen before, but I haven't had to write something like this for
like a year and now I'm drawing a one in the morning blank. Is it a GROUP BY
thing? or a sub-query thing?
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists