Script to combine generic tables

    The script below helps to combine all generated tables with Generic prefix into the one table:

     

    Let vNoOfTables = NoOfTables();

     

    For cnt=0 to $(vNoOfTables)-1

     

    Let vTableName=TableName($(cnt));

      TableList:

      LOAD

      '$(vTableName)' as TableName

      Autogenerate(1);

    Next

     

    Let vFirstTableName=Peek('TableName',0,'TableList');

    Let vNumberOfRows = NoOfRows('TableList')-1;

     

    For cnt=1 to $(vNumberOfRows)

     

    Let vTableName=Peek('TableName',$(cnt),'TableList');

     

    Join($(vFirstTableName))

    LOAD * Resident $(vTableName);

    DROP Table $(vTableName);

    Next

     

    Rename Table $(vFirstTableName) to MainTable;