Repost: Append query problem

  • Thread starter Thread starter John Daily
  • Start date Start date
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;
 
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top