Transform rows into columns

  • I have a table with 3 columns KEY, Value , XMLId. Here is how the data in the table looks like:

    KEY value XMLId

    COLUMN1 a 2

    COLUMN2 B 2

    COLUMN3 C 2

    COLUMN4 d 2

    ID      1 2

    COLUMN1 1 18

    COLUMN2 2 18

    COLUMN3 3 18

    COLUMN4 4 18

    ID      2 18

    I need to transform rows into columns and get the data like this as two rows and six columns:

    XMLID, ID, COLUMN1, COLUMN2, COLUMN3, COLUMN4

    2, 1, a, B, C, d

    18, 2, 1, 2, 3, 4

    Can someone help?

    Thanks,

     

  • Not the best solution, but should work. 

    (Thanks sue)

    I wasn't born stupid - I had to study.

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

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