I ended up using cursors and creating a temp table on the fly.

Duane

-----Original Message-----
From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 11, 2006 10:20 PM
To: CF-Community
Subject: Re: SQL Question

you might be able to leverage the coalesce function like this article:

http://www.sqlteam.com/item.asp?ItemID=2368


On 9/11/06, Duane <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> Is there anyway within an sql query to return a sub query that has
multiple
> records? Ex:
>
> Users:
> UID     Name
> 1       Fred
> 2       Bob
> 3       Mary
>
> UID     LocID
> 1       1
> 1       2
> 2       3
> 3       2
>
> LocID   Location
> 1       Main Office
> 2       Cafeteria
> 3       Gymnasium
>
> Is it possible to return a record set that looks like:
> UID     Name    Location
> 1       Fred    Main Office, Cafeteria
> 2       Bob     Gymnasium
> 3       Mary    Cafeteria
>
> Thanks,
> Duane
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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-Community/message.cfm/messageid:215189
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to