5 Replies Latest reply: Nov 22, 2016 8:51 PM by Zikun Zhu RSS

    Repeat the same SQL queries for multiple ODBC connections

    Zikun Zhu

      Hi everyone.

       

      I want to find an efficient way to repeat the same LOAD statements and SQL queries for multiple ODBC connections. My current script looks like this:

       

      LIB CONNECT TO 'DB1';

      LOAD ... ;

      SQL ...;

       

      LIB CONNECT TO 'DB2';

      LOAD ... ;

      SQL ...;


      LIB CONNECT TO 'DB3';

      LOAD ... ;

      SQL ...;


      LIB CONNECT TO 'DB4';

      LOAD ... ;

      SQL ...;

       

      Is there a better way to do this? Because the SQL queries are quite long, can we avoid repeating the same

      "

      LOAD ... ;

      SQL ...;

      "?