Pivot how to - help

  • Hi,

    I need help with a sql query, the table looks like the below:

    IDproductfldNamefldVal

    0001ABC123Type1NULL

    0001ABC123Type2NULL

    0002ABC128Type278

    0003ABC129Type1MAJOR

    0004ABC140Type4MAJOR

    0006ABC140Type4MAJOR

    0006ABC141Type1NULL

    0008ABC141Type1NULL

    0008ABC145Type59

    I want to pivot it so that it looks like this:

    IDproductType1Type2Type4Type5

    1ABC123NULL

    1ABC123NULL

    2ABC12878

    3ABC129MAJOR

    4ABC140MAJOR

    6ABC140MAJOR

    6ABC141NULL

    8ABC141NULL

    8ABC1459

    How do i do a query for this, or how do i do this in ssis?

    Thanks

  • Any one?

  • duplicate post. no replies, please.

    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]

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

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