How to Convert Rows into Columns?

  • Hi All, I have a table with the following data.

    ClientVisitGuid HealthIssue

    1001 Cancer

    1001 Pneumonia

    1001 Chestpain

    1002 Fever

    1002 Heartpain

    I want to convert the HealthIssue Column into Number of Columns on the basis of ClientVisitGuid.

    Below is the desired Result Output. Please Suggest a query?

    ClientVisitGuid HealthIssue1 HealthIssue2 HealthIssue3

    1001 Cancer Pneumonia Chestpain

    1002 fever HeartPain

  • duplicate post.

    Already answered here



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Sorry Guys, this is already posted in TSQL 2008 Forums.I am unable to delete this guys, so never mind bt this post..Please Ignore.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply