3 Replies Latest reply: Dec 13, 2013 6:17 AM by Jindrich Kratky RSS

    Split one row to several

    Jindrich Kratky

      Hi,

       

      I would like to split one row to several based on a coilumn. Here is the example

       

      The input is like this

       

      IDData1Data2Data3
      1AX8515
      2BD1210
      3CF40/E0212/50
      4DW16/R7042/55

       

      And I need to have new table where rows with slash in Data2 column will be splited to several rows. So output should be like this

       

      Header 1Header 2Header 3Header 4
      1AX8515
      2BD1210
      3_1CF4012
      3_2CE0250
      4_1DW1642
      4_2DR7055

       

      Currently I'm using the FOR statement to go through all the lines of original table and adding new line when slash is found. But this is very slow. Isn't there any function which can help me to do it much faster?

       

       

      Thanks in advance,

      Jindra