Repost: Append query problem

J

John Daily

I am having a problem with this append query and it
appending duplicate records. I have tried all sorts of
syntax to get it to not do that. I am in A2000 and that
is the only fields in the Payment Info table. I have even
tried to change the properties of the query and that still
didn't work.
-----------------
INSERT INTO [Payment Info] ( acct_num, total_charges,
total_pmts, total_adjst, acct_bal )
SELECT DISTINCT [CT Denials].pat_number, [CT
Denials].total_charges, [CT Denials].total_pmt_amt, [CT
Denials].total_adjst_amt, [CT Denials].acct_bal
FROM [CT Denials] INNER JOIN [Payment Info] ON [CT
Denials].pat_number = [Payment Info].acct_num;
 
M

[MVP] S. Clark

You are inserting values into the table in which the INNER JOIN is based.
Thus, it will only insert values for those that already existed. Won't that
cause duplicates by design?

What is the objective of the INNER JOIN in this query?

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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