September 07, 2008
For ColdFusion hosting try HostMySite.com. |
Home / Groups / ColdFusion Talk (CF-Talk)
SQL concat? helpWhat 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 > 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 > > > > 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 > > > > > > > > > > |
Mailing Lists
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||