select data from 2 Dbs in code?

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I need to sync data from a remote database. I am opening two recordsets and
now need to compare data and find records that are not in each recordset. Is
there a way to do this with SQL rather than loop through and search by each
record?
 
Have you tried using the "Find Unmatched Query Wizard" in Access? (In
the Queries section of the Database window, it's under the "New" menu
list.) The wizard will create for you a Query which, if it doesn't do
exactly what you want, you can edit to suit your needs.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
I've got the no match query working and am trying to combine it with an
append query to add the records. I think I need to maybe separate the no
match data to a temparary table and then append them. Append and no match at
the same time doesn't seem to work.
I guess I could just loop through the recordset and add them but I think
thats slower.

Which way would you go?
 
I'd write them to a Table (via Make-Table Query, or if you prefer, just
display everything in Query Datasheet View and copy and paste to a new
Table). It's not elegant, but nobody else is going to be involved and
you'll get rid of the evidence later. :-) Examine the Table to
determine if you agree with what's there, and if it's OK, append the
contents to your local Table

Oh, yes, I'd back up the database first. Afterwards I'd delete the
temporary stuff, such as the no-match Query and the temporary Table.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
Back
Top