Concatanate values in a row based on part level in BOM

  • Input
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 64"]Part Name[/TD]
    [TD="width: 64"]Level[/TD]

    [/tr]


    [tr]


    [td]

    WORLD

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    INDIA

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    TN

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    DELHI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    KERALA

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    US

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    CALI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    FLOR

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    MICHI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [/TABLE]


    Output
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0"]

    [tr]


    [TD="width: 173"]Output[/TD]
    [TD="width: 64"] [/TD]
    [TD="width: 64"]Part Name[/TD]
    [TD="width: 64"]Level[/TD]

    [/tr]


    [tr]


    [td]

    1-WORLD

    [/td]


    [td][/td]


    [td]

    WORLD

    [/td]


    [td]

    1

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-INDIA

    [/td]


    [td][/td]


    [td]

    INDIA

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-INDIA-3-TN

    [/td]


    [td][/td]


    [td]

    TN

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-INDIA-DELHI

    [/td]


    [td][/td]


    [td]

    DELHI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-INDIA-KERALA

    [/td]


    [td][/td]


    [td]

    KERALA

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-US

    [/td]


    [td][/td]


    [td]

    US

    [/td]


    [td]

    2

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-US-3-CALI

    [/td]


    [td][/td]


    [td]

    CALI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-US-3-FLOR

    [/td]


    [td][/td]


    [td]

    FLOR

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [tr]


    [td]

    1-WORLD-2-US-3-MICHI

    [/td]


    [td][/td]


    [td]

    MICHI

    [/td]


    [td]

    3

    [/td]


    [/tr]


    [/TABLE]


    Kindly help to generate output listed above

Participate now!

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