3 Replies Latest reply: Jun 17, 2011 4:13 PM by Daniel Rozental RSS

    how to load multiple SQL DB ?

    David Zenesh

      Hi, I have an issue in loading multiple SQL DB.


      First, I'm loading the list of the companies:


      FROM system.dbo.ENVIRONMENT;



      The table looks like this:


      Company_1, eng

      Company_2, spn

      Company_3, ger



      now I would like to load each company's data which is located in the company's Database (the name of the database is the content of the COMP_NAME i.e, Company_1, Company2_Comapny_3 etc  so the name of the Database shoud be   Company_1.dbo.'table name').


      I will appreciate your help on how to create a loop which will run on the SQL SELECT and will load all the companies data.


      Thanks in advanced.