insert into table1 select * from table2 where table2.xyzid not in(select xyzid from table1)
INSERT INTO DATABASE2.DBO.TABLEX(FIELD1, FIELD2, ...) SELECT FIELD1, FIELD2, ... FROM DATABASE1.DBO.TABLEX -- NOT FIELD LIST MUST BE SAME FOR BOTH TABLES
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)