Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2013

    Unanswered: querying two databases

    I need to query one database, a mssql, in order to get supplier names, then use those names to get other information from two DB2 tables. I've made of view of the two DB2 tables so it will only take one query for that data. However, the best way I can think to do this is to store all the supplier names from the mssql DB in an array, then loop though each doing about 1200 queries to get the rest of the data.

    Are there any better ways to do this I might not be aware of?


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Instead of looping, put the mssql data into a temporary table in DB2. Then you can query against it directly.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts