Mark W. Breneman wrote: > > I hope to get query results like: > TeacherName Buildings > Bob High School, Middle School, EMC > Sue ELC, Middle School > > Here is basically what I am trying to do: > > SELECT TeacherName, (select buildingname from location where teacherID = 1) > as Buildings > FROM Teachers > > But you can not run a subquery that returns more then one value. > > Any Ideas on how to work around this?
If MS SQL Server supports user defined aggregates you should be able to define a concatenation aggregate. For an example of how it works in PostgreSQL: http://www.zope.org/Members/pupq/pg_in_aggregates Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

