I inherited a table with a few simple columns.
I want to find all records where the [Patient ID Medical Record Number] are the same AND the [Antibody, Antigen or Special Instruction Code] are the same.
The problem is that the [Antibody, Antigen or Special Instruction Code] needs to be case sensitive. For instance, a c (lower case) and C (upper case) are completely different results for us.
I used the query wizard and got this query, but it gives me a non-case sensitive result.
Your help would be greatly appreciated.
I want to find all records where the [Patient ID Medical Record Number] are the same AND the [Antibody, Antigen or Special Instruction Code] are the same.
The problem is that the [Antibody, Antigen or Special Instruction Code] needs to be case sensitive. For instance, a c (lower case) and C (upper case) are completely different results for us.
I used the query wizard and got this query, but it gives me a non-case sensitive result.
Code:
SELECT First(PTNT_INSTR.[Patient ID Medical Record Number]) AS [Patient ID Medical Record Number Field], First(PTNT_INSTR.[Antibody, Antigen or Special Instruction Code]) AS [Antibody, Antigen or Special Instruction Code Field], Count(PTNT_INSTR.[Patient ID Medical Record Number]) AS NumberOfDups
FROM PTNT_INSTR
GROUP BY PTNT_INSTR.[Patient ID Medical Record Number], PTNT_INSTR.[Antibody, Antigen or Special Instruction Code]
HAVING (((Count(PTNT_INSTR.[Patient ID Medical Record Number]))>1) AND ((Count(PTNT_INSTR.[Antibody, Antigen or Special Instruction Code]))>1));
Your help would be greatly appreciated.