September 20, 2006 at 5:24 am
hi
if u r using sql server 2005 u can use the PIVOT operator for this.
"Keep Trying"
September 20, 2006 at 5:37 am
I might suggest a T SQL Training course.
[font="Comic Sans MS"]The GrumpyOldDBA[/font]
www.grumpyolddba.co.uk
http://sqlblogcasts.com/blogs/grumpyolddba/
September 21, 2006 at 7:32 am
If this may be more helpfull. I think you'd be better off to do that client side. It's a very basic loop inside another loop.
Can you do this client side? If not why?
September 22, 2006 at 6:22 am
I can do it client side using the application code but I would really like to build an sql statement so that users can also run the query.
September 22, 2006 at 7:01 am
Do you need that in seperate columns or single comma delimited column?
September 22, 2006 at 7:20 am
I would like to view it in separate columns or single comma delimited column. For example in one row I would have Application name, Client 1 name, Client 2 name until all clients have been accounted for.
Which ever method gives me the result would be fine by me.
Am I making sense or are you guys totally lost
September 22, 2006 at 7:25 am
Check the third post from this thread. Just ask if you need help implemanting it :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=278637
September 22, 2006 at 8:30 am
I have been trying this solution out and it seems to be the answer to my problem.
Thanks very much for your help.
September 22, 2006 at 8:41 am
Great! However if you ever need to have them in separated columns, then just use Chiraq solution and check out the pivot option in the books online.
Viewing 9 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply