betachristopher
Programmer
I need to create a query that compares multiple records in the same table. Below are examples of the data I am looking to compare. In the first list, you can see that one of the records has a different DOB. In the second list, you can see that one of the PATIENT numbers is different.
I want my query to show the records with incorrect data as well as the related records with the correct data. What is the best way to create this query?
SITE PATIENT DOB ACCN1 ACCN2 VISIT_DSCR
103942 1039427004 11/13/1948 AB-A-364 AB00475 Visit 1 (Week-4)
103942 1039427004 11/13/1948 AB-B-364 AB00475 Visit 1 (Week-4)
103942 1039427004 11/11/1948 AB-P-364 AB00477 Visit 1 (Week-4)
103942 1039427004 11/13/1948 AB-A-370 AB01589 Unscheduled
103942 1039427004 11/13/1948 AB-B-370 AB01589 Unscheduled
SITE PATIENT DOB ACCN1 ACCN2 VISIT_DSCR
103952 1039527048 10/22/1955 AB-A-991 AB02337 Visit 1 (Week-4)
103952 1039527048 10/22/1955 AB-B-991 AB02337 Visit 1 (Week-4)
103952 1039527048 10/22/1955 AB-P-991 AB02337 Visit 1 (Week-4)
103952 1035927048 10/22/1955 AB-P-2052 AB02340 Early Termination
Using Access 2003 with a SQL back end.
I want my query to show the records with incorrect data as well as the related records with the correct data. What is the best way to create this query?
SITE PATIENT DOB ACCN1 ACCN2 VISIT_DSCR
103942 1039427004 11/13/1948 AB-A-364 AB00475 Visit 1 (Week-4)
103942 1039427004 11/13/1948 AB-B-364 AB00475 Visit 1 (Week-4)
103942 1039427004 11/11/1948 AB-P-364 AB00477 Visit 1 (Week-4)
103942 1039427004 11/13/1948 AB-A-370 AB01589 Unscheduled
103942 1039427004 11/13/1948 AB-B-370 AB01589 Unscheduled
SITE PATIENT DOB ACCN1 ACCN2 VISIT_DSCR
103952 1039527048 10/22/1955 AB-A-991 AB02337 Visit 1 (Week-4)
103952 1039527048 10/22/1955 AB-B-991 AB02337 Visit 1 (Week-4)
103952 1039527048 10/22/1955 AB-P-991 AB02337 Visit 1 (Week-4)
103952 1035927048 10/22/1955 AB-P-2052 AB02340 Early Termination
Using Access 2003 with a SQL back end.