Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing two database tables

Status
Not open for further replies.

shavon

Programmer
Jun 18, 2001
102
CA
Good day:

I would like to compare two database tables and update one with records from the other if the record does not exist there.


DB1 DB2
Table 1 Table 2
sss sss
sds sds
fgh --> fgf (added because it does not exist)

I have a clue already but it does not work

sSql = "Insert Into x (Select * From Incidents In 'z:\Production Apps\LsnApps\Incident Tracking\calllog.mdb')" 'where not exists (Select * from x In 'c:\chris\1.mdb')"

I am trying to compare the tables from the 2 DB's and only update where the record does not exist. Any advise would be greatly appreciated. Thank you.
 
Follow the unmatched query wizard and then you have retrieved all the missing records transform the generated query to an append query.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top