Transpose columns of data across to a single row

  • Hi


    I would like to transpose 4 columns across into one row but am not sure the best way to accomplish...any assistance to be able to preform the below would be appreciated.


    You will note that the determining factor for the separate rows is the bold Form LOC1 numbers (0402,0403 or 0101)
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 296"]

    [tr]


    [td]

    Old format

    [/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    FROM LOC1

    [/td]


    [td]

    TO LOC1

    [/td]


    [td]

    SKU

    [/td]


    [td]

    Qty

    [/td]


    [/tr]


    [tr]


    [td]

    12370402A

    [/td]


    [td]

    09370402A

    [/td]


    [TD="align: right"]9915025232[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370402B

    [/td]


    [td]

    09370402B

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370402C

    [/td]


    [td]

    09370402C

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370403E

    [/td]


    [td]

    09370402E

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370403F

    [/td]


    [td]

    09370402F

    [/td]


    [TD="align: right"]147202355[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370403G

    [/td]


    [td]

    09370402G

    [/td]


    [TD="align: right"]149802513[/TD]
    [TD="align: right"]1[/TD]

    [/tr]


    [tr]


    [td]

    12370403I

    [/td]


    [td]

    09370402I

    [/td]


    [TD="align: right"]198600380[/TD]
    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    12370101K

    [/td]


    [td]

    09370402K

    [/td]


    [TD="align: right"]115120345[/TD]
    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    12370101M

    [/td]


    [td]

    09370402M

    [/td]


    [TD="align: right"]115120345[/TD]
    [TD="align: right"]4[/TD]

    [/tr]


    [/TABLE]
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 1208"]

    [tr]


    [TD="colspan: 2"]New transposed format[/TD]

    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    FROM LOC1

    [/td]


    [td]

    TO LOC1

    [/td]


    [td]

    SKU

    [/td]


    [td]

    Qty

    [/td]


    [td]

    FROM LOC1

    [/td]


    [td]

    TO LOC1

    [/td]


    [td]

    SKU

    [/td]


    [td]

    Qty

    [/td]


    [td]

    FROM LOC1

    [/td]


    [td]

    TO LOC1

    [/td]


    [td]

    SKU

    [/td]


    [td]

    Qty

    [/td]


    [td]

    FROM LOC1

    [/td]


    [td]

    TO LOC1

    [/td]


    [td]

    SKU

    [/td]


    [td]

    Qty

    [/td]


    [/tr]


    [tr]


    [td]

    12370402A

    [/td]


    [td]

    09370402A

    [/td]


    [TD="align: right"]9915025232[/TD]
    [TD="align: right"]1[/TD]

    [td]

    12370402B

    [/td]


    [td]

    09370402B

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [td]

    12370402C

    [/td]


    [td]

    09370402C

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [tr]


    [td]

    12370403E

    [/td]


    [td]

    09370402E

    [/td]


    [TD="align: right"]970743009[/TD]
    [TD="align: right"]1[/TD]

    [td]

    12370403F

    [/td]


    [td]

    09370402F

    [/td]


    [TD="align: right"]147202355[/TD]
    [TD="align: right"]1[/TD]

    [td]

    12370403G

    [/td]


    [td]

    09370402G

    [/td]


    [TD="align: right"]149802513[/TD]
    [TD="align: right"]1[/TD]

    [td]

    12370403I

    [/td]


    [td]

    09370402I

    [/td]


    [TD="align: right"]198600380[/TD]
    [TD="align: right"]2[/TD]

    [/tr]


    [tr]


    [td]

    12370101K

    [/td]


    [td]

    09370402K

    [/td]


    [TD="align: right"]115120345[/TD]
    [TD="align: right"]2[/TD]

    [td]

    12370101M

    [/td]


    [td]

    09370402M

    [/td]


    [TD="align: right"]115120345[/TD]
    [TD="align: right"]4[/TD]

    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [td][/td]


    [/tr]


    [/TABLE]

    Thanks in advance

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!