What I actually wanted was a list of all someotherID's for a someID in a single column. I found a function that sort of does this (Coalesce), and after digging up my old code, did it using temp tables and cursors.
I was optimizing code that was doing it in CF and was taking a little too long to run for my taste. Russ > -----Original Message----- > From: Kris Jones [mailto:[EMAIL PROTECTED] > Sent: Friday, August 04, 2006 4:00 PM > To: CF-Talk > Subject: Re: SQL concat? help > > The syntax you're using is, I think, correlated subquery. Not sure > what that concat() function does--maybe that was a UDF that returned > an actual list of IDs? In any case, here is a simple join that would > return a recordset of related IDs: > > select s.someid, so.someotherid > from mytable s left outer join anothertable so on s.someid=so.somid > > Cheers, > Kris > > On 8/4/06, Russ <[EMAIL PROTECTED]> wrote: > > I'm trying to do a query that should go something like > > > > > > > > Select someid, (select concat(someotherid) from anothertable where > > anothertable.someID=mytable.someid) from mytable > > > > > > > > Basically I want a query that brings in someID and for each of those a > list > > of ID's from another table. > > > > > > > > Is this possible? I think I remember doing a query like this a long > time > > ago, but can't remember the exact syntax. > > > > > > > > Russ > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248842 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

