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

Append Query

P: 25
hi.. i'm using a append query to filter some new records that must be updated in the lookup table.

In this lookup table it consist of the part number and the type of the product. the part number is the primary key.

New records will be entered and the product type will be lookup through the part number in the lookup table. However to ensure that the user remembers to update the lookup table with the latest part number, i'll using an append query to filter the new product numbers whose product type is empty. However when the query filters, it returns many records of the same product number thus the append query is unable to append the records into the lookup table because the part number in the lookup table is a primary key.

Is there any way to index the records in the append query?
Oct 2 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,072
Just adding "Distinct" in the Append query should do the trick.
Try something like:
Expand|Select|Wrap|Line Numbers
  1.  INSERT INTO tblParts (PArtID) (select distinct partID from tblParts)
Oct 6 '07 #2

Post your reply

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