Finding Differnces in Two Tables

A

Adam

I have two tables with linked 'Incident#'. I am trying to identify errors in
one of the tables. How do I create a query that identifies matching
'Incident#' with a different 'IncidentDate' between the two tables?

Thanks!
 
S

Stefan Hoffmann

hi Adam,
I have two tables with linked 'Incident#'. I am trying to identify errors in
one of the tables. How do I create a query that identifies matching
'Incident#' with a different 'IncidentDate' between the two tables?
Your queries SQL should look like this:

SELECT L.*, R.*
FROM yourTable1 L
INNER JOIN yourTable2 R
ON L.[Incident#] = R.[Incident#]
WHERE L.IncidentDate <> R.IncidentDate



mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top