SQL LEFT JOIN (resembles not exist)
SELECT table1.* FROM masonm/xdwxp010 table1 left join dvdta/dwxp010
table2 on (table1.acctno = table2.acctno and table1.policy =
table2.policy and table1.effdte = table2.effdte and table1.edsno =
table2.edsno) WHERE table2.acctno is null
I prefer not exists
select * from table1
where not exists (select field2 from table2 where table2.field2 = table1.field1)
Leave a Reply
You must be logged in to post a comment.