1 Reply Latest reply: Nov 21, 2011 8:29 AM by Vilius Sasnauskas RSS

    Can load data from string variable ?

    Vilius Sasnauskas

      I have script . What wrong in here ?

       

      TableOfHierarcy:

      hierarchy (ID, ParentID, Name, 'ParentName', Name, 'Path', '|', 'Depth')

      load
          
      ID,
          
      ParentID,
          
      Nameresident TableOfNodes;

      LET a = NoOfFields('TableOfHierarcy');

      LET b = 1;

      LET c = '';

      LET d = '';

      for b = 1 to a-6
          
      c = c & ' name' & $(b) & ' as new_name' & $(b) &' ,'
          
      NEXT

      d = left(c,len(c)-1);    


      TableOfHierarcy2:

      load
          
      ID,
          
      ParentID,
          
      Name,
          
      ParentName,
          
      Path,

          
      [{d}],

          
      Depth

      resident TableOfHierarcy;