Return non matched values

G

Guest

I need to return non matched records between 2 tables with a many to many
relationship.

tbl CrosswalkClaims contains medical claims to be sent to medicare. In the
table is chart#, Date of Visit, Procedure Code, Diagnosis Code. (Each
procedure has a corresponding diagnosis code. These diagnosis codes must be
on the approved list for each procedure code which is determined by medicare.)

tbl DXCrosswalk contains all the Procedure codes and corresponding Diagnosis
codes. There is no primary key in this table as both Procedure and Diagnosis
appear many times.

example of table data

Procedure Dx
97140 780
97140 V54
97110 780
97110 V54
97112 V54
97112 840

I need to return all records in tbl CrosswalkClaims that do not have a
corresponding Procedure Diagnosis match in tbl DXCrosswalk.

How can I do this? I was able to return matching records by linking the
procedures and diagnosis but I need the opposite.
 
G

Guest

Another possible solution would be to simply delete the matching records in
tbl CrosswalkClaims since it is only temporary table which is created after
new claims are made and deleted after they are checked.

I created a query where
tbl CrosswalkClaims.procedure = tbl DXCrosswalk.procedure And tbl
CrosswalkClaims.Diagnosis=tblDXCrosswalk=Diagnosis.

This returns all the fields I would like to delete from the table. But when
I try to run it as a delete query I get an error could not delete from
specified tables.
 

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