So I have two systems I often have to join together to display certain reports. I've got one system that stores metadata on documents that is stored in SQL Server, usually by part number. The list of part numbers I would want to get documents for come from an Oracle table in our ERP system. My current method goes like this:
- Get data from ERP (Oracle) system into a
DataTable. - Compile
string[]of part numbers from a column. - Use an
IN()statement to get all document information from docs (MSSQLSVR) system into anotherDataTable. - Add columns to ERP
DataTable, loop through rows. - Fill out document info from docs
DataTable,if(erpRow["ITEMNO"] == docRow["ITEMNO"])
This, to me feels really inefficient. Now obviously I can't use one connection string to JOIN the two tables, or use a database link, so I assume there will have to be two calls, one to each database. Is there another way to join these two sets together?