Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sub query returns multiple values (and i want it to)

Status
Not open for further replies.

NorthStarDA

IS-IT--Management
Mar 16, 2004
614
US
I have no sql to show really, just a general question. One column in my query is derived from a sub query

SELECT .., (SELECT..) as col FROM etc..

The subselect might return 3 records (which will throw an error), but what i want it to do is return 1 row with the 3 values it brought back separated by commas or something- is this possible?

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
most likely GROUP_CONCAT is what you are looking for, but if it isn't can you be less abstract in what you are trying to do? an example perhaps to make clear what you want?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top