3 Replies Latest reply: Oct 28, 2015 2:22 PM by Christian Wolf RSS

    my Sql Database issue

    Siva Prakash Thummalapenta

      Hi guys ,

      How to load All tables in mysql database  and convert into Qvds..i'm searched in forum Load all tables in database dynamically

      based on this i'm generated a script but im getting error....

       

      this is my table in the database:

      SQL SELECT *

      FROM `sbi_apg_db`.`Availability;

       

      This is my script:

      SQLTableList:

      LOAD "TABLE_NAME" as  TableNames;

      SQL SELECT DISTINCT "TABLE_NAME"

      FROM "sbi_apg_db".COLUMNS;

       

      Let vTableCount = NoOfRows('SQLTableList');

      Let vTableCountQVD = 'dbo.[' & NoOfRows('SQLTableList') & ']';

       

      For i = 0 To $(vTableCount) -1

      LET vMyTableName = 'dbo.[' & Peek('TableNames', $(i), 'SQLTableList') & ']';

      LET vMyTableNameQVD = Replace(Peek('TableNames', $(i), 'SQLTableList'), ' ', '');

       

      $(vMyTableNameQVD):

      SQL SELECT *FROM $(vMyTableName);

      STORE $(vMyTableNameQVD) INTO $(ExtractQVD)$(vMyTableNameQVD).QVD;

      DROP Table $(vMyTableNameQVD);

      Next i

       

       

      this is my error:

      see the attachment

       

      Please anyone give syntax..for this script