Querying Joined Tables

  • hi

    if u r using sql server 2005 u can use the PIVOT operator for this.

     

    "Keep Trying"

  • I might suggest a T SQL Training course.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • 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?

  • 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.

  • Do you need that in seperate columns or single comma delimited column?

  • 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

  • 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

  • I have been trying this solution out and it seems to be the answer to my problem.

     

    Thanks very much for your help.

  • 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