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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Records in two identical Database

Status
Not open for further replies.

Joelo

MIS
Sep 27, 2003
61
Please could anyone help me out on how to Compare Records in two identical tables in diferent Database and copy any records that exist in table1 but does not exist in table2 to Table3 (identical) in another Database...

Please really don't know where to start from.....kindly help me out.

Thanks in advance

 
Could try something like this for example. This adds into table 3 all the records from table1 that is diferent then table2.

select * into table3 from table1 where (table1.field1<>table2.field1 and table1.field2<>table2.field2)



________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top