We are designing a fairly large brownfield application, and run into a bit of a issue.
We have a fairly large amount of information in a DB2 database from a legacy application that is still loading data. We also have information in an Oracle database that we control.
We have to do a 'JOIN' type of operation on the tables. Right now, I was thinking of pulling the information out of the DB2 table into a List<> and then iterating those into a SQL statement on the Oracle database such as:
select * from accounts where accountnum in (...)
Is there any easier way to interact between the databases, or at least, what is the best practice for this sort of action?