By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,433 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

ACC2K - Duplicate OutPut

P: 234
Hello all,
I get an error when trying to run an append query that states duplicate output to a field name. I think because I'm trying to append records to a table that is already in the use. Below is the SQL from the query. Thanks in advance.


Expand|Select|Wrap|Line Numbers
  1. INSERT INTO PillweightArchive ( [DRUG NAME], NDC, [Pick Method], Single_Label, [DRUG NAME] )
  2. SELECT DISTINCT Every_med.Drug, Every_med.NDC, Every_med.Pickmethod, Every_med.[Single Label], PillweightArchive.[DRUG NAME]
  3. FROM Every_med LEFT JOIN PillweightArchive ON Every_med.NDC = PillweightArchive.NDC
  4. GROUP BY Every_med.Drug, Every_med.NDC, Every_med.Pickmethod, Every_med.[Single Label], PillweightArchive.[DRUG NAME]
  5. HAVING (((PillweightArchive.[DRUG NAME]) Is Null))
  6. ORDER BY Every_med.Drug;
May 21 '08 #1
Share this Question
Share on Google+
2 Replies

P: 234
Ok, the problem is solved. I didn't realized I had duplicated columns, Drug Name, and didn't realize access had a problem with that....

May 21 '08 #2

Expert Mod 15k+
P: 31,261
Well Bender, it would be hard to conceive of a scenario where an RDBMS would NOT get confused when trying to add data to a field that shares its name with another field in the same dataset ;)
May 22 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.