Hello,
I need some help in finding the best way to compare records in a Access table to the records in 6 different tables (with millions of records each) in an Oracle DB via ODBC, using VBA...
Notes about the tables in the Oracle DB: (1) It's not an option to modify the them, (2) Access doesn't see any of their fields as being indexed (I don't know if they are or not), (3) the tables are all layed out the same, and for my purposes I would prefer to see them all as one table.
What I want to do is walk thru my Access table and try to find records matching critera in one of the 6 Oracle tables, and if I find it, compare another field in the two tables, and update the record in my Access table with the result of the comparisions.
Right now I have some very slow code that opens each of the 6 Oracle tables as ADO recordsets, one at a time, and walks thru my Access table (also opened as an ADO recordset) and uses the .Find command to try and locate the record in each table.
Here's an example of the tables:
Local Access table (Access_Table):
The 6 Oracle tables (Oracle_Table_1, Oracle_Table_2, etc):
In the example above, I simply want to see if account 1 from Access_Table exists in Oracle_Table_1 (or 2 - 6), and if it does, I want to change the VERIFIED field in Access_Table to "Y".
What's the best way (speed wise) to do this? Do the .Find directly on tables? Import all six of the tables into a temporary table in my Access DB, then do the .Find on that table? Other ideas?
Thank you!
I need some help in finding the best way to compare records in a Access table to the records in 6 different tables (with millions of records each) in an Oracle DB via ODBC, using VBA...
Notes about the tables in the Oracle DB: (1) It's not an option to modify the them, (2) Access doesn't see any of their fields as being indexed (I don't know if they are or not), (3) the tables are all layed out the same, and for my purposes I would prefer to see them all as one table.
What I want to do is walk thru my Access table and try to find records matching critera in one of the 6 Oracle tables, and if I find it, compare another field in the two tables, and update the record in my Access table with the result of the comparisions.
Right now I have some very slow code that opens each of the 6 Oracle tables as ADO recordsets, one at a time, and walks thru my Access table (also opened as an ADO recordset) and uses the .Find command to try and locate the record in each table.
Here's an example of the tables:
Local Access table (Access_Table):
Code:
ACCT_NUM EMPLOYEE VERIFIED
1 56001 N
2 56002 N
The 6 Oracle tables (Oracle_Table_1, Oracle_Table_2, etc):
Code:
ACCT_NUM EMPLOYEE MANY OTHER FIELDS...
1 56001 ... ...
5 56008 ... ...
9 56001 ... ...
In the example above, I simply want to see if account 1 from Access_Table exists in Oracle_Table_1 (or 2 - 6), and if it does, I want to change the VERIFIED field in Access_Table to "Y".
What's the best way (speed wise) to do this? Do the .Find directly on tables? Import all six of the tables into a temporary table in my Access DB, then do the .Find on that table? Other ideas?
Thank you!