NEW & DELETED Records Query

ggodwin

Registered User.
Local time
Today, 06:23
Joined
Oct 20, 2008
Messages
112
Hey Folks I have two similar tables and I am looking to create a query that will tell me what is "New".

I think all that is needed for this are the table names and the one field in question.

Tbl1 = SkpiUpdate
Tbl2 = Skpi

Primary Key Field = ScrapRecordTag

Is there an easy way how to show what has been added to SkpiUpdate in comparison to Skpi

also, the inverse of this..
Can I see what was deleted by comparing Skpi to SkpiUpdate? If it is missing from SkpiUpdate then it has been deleted. I assume these are the same method just backwards from each other.
ua_right_curve.gif
 
Code:
select tbl1.* from tbl1 left join tbl2 on tbl1.id = tbl2.id where tbl2.id=null
Above query gives you records that appear in tbl1 and not in tbl2.

Enjoy!
 

Users who are viewing this thread

Back
Top Bottom