4 Replies Latest reply: Jun 22, 2011 9:50 AM by Sridhar Ethiraj RSS

    Transform table in script

      Hi everyone!

       

      I have a table with the following structure:

       

      table1

      NumberNameText
      1A-nameA1
      1B-nameB1
      1C-nameC1
      2A-nameA2
      2B-nameB2
      2C-nameC2
      3A-nameA3
      3B-nameB3
      3C-nameC3

       

       

      Based on table1 I want to get the following table:

       

      NumberA-nameB-nameC-name
      1A1B1C1
      2A2B2C2
      3A3B3C3

       

      My script:

       

      table2:

      Load Number,

      if(Name = 'A-name', Text) as A-name,

      if(Name = 'B-name', Text) as B-name,

      if(Name = 'C-name', Text) as C-name

      resident table1;

      But unfortunately my result is following table:

       

      table2

      NumberA-nameB-nameC-name
      1A1--
      1-B1-
      1--C1
      2A2--
      2-B2-
      2--C2
      3A3--
      3-B3-
      3--C3

       

      Can anyone help me?