Home Forums SQL Server 2008 T-SQL (SS2K8) Need help in converting rows into column... include attached image file in detail RE: Need help in converting rows into column... include attached image file in detail

  • If you have trouble getting the PIVOT syntax right, you might want to try the "classic" rossTab approach. alternatively.

    If the max. number of items is known (e.g. 3 based on your sample data), you wouldn't need the dynamic version.

    But if the max number can vary, either write the CrossTab to cover a max limit you're safe with or have a look at the DynamicCrossTab solution.

    Both articles are referenced in my signature.



    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]