SSIS how to split a row to multiple rows

  • I Have a flat file with cols

    ID, Market1, Market2,Market3

    And I need to transfer to a Table with cols’s

    ID,TYPE, VALUE

    Where ID maps to ID and Market1..3 map to Value and TYPE is the Colum the value

    Ie.

    Flat file

    1,100,12,113

    2,43,12,12

    3,1,2,3

    Table

    1,Market1,100

    1,Market2,12

    1,Market3,113

    2,Market1,43

    2,Market2,12

    2,Market3,12

    3,Market1,1

    3,Market2,2

    3,Market3,3

    How can I do this in SSIS a condition SPLIT? but then how do I set TYPE?

    Many thanks

  • I think an easy approach would to use a Multicast and then 3 different destination transforms, one for each type.

  • Come to think of it the UNPIVOT transform would probably be even easier, and almost certainly more efficient.

  • Many thanks

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

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