Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

append query key violations

Posted on 2004-04-26
2
Medium Priority
?
497 Views
Last Modified: 2012-05-04
I have an append query:
INSERT INTO SupplierContacts ( [Creditor No], OfficeNumber, FirstName )
SELECT Suppliers.[Creditor No], Suppliers.Phone, Suppliers.Contact
FROM Suppliers;

it fails because of 'key violations'
0
Comment
Question by:robiago
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 1500 total points
ID: 10923671
Try this

INSERT INTO SupplierContacts ( [Creditor No], OfficeNumber, FirstName )
SELECT Suppliers.[Creditor No] As [Creditor No], Suppliers.Phone As [OfficeNumber], Suppliers.Contact As FirstName
FROM Suppliers;

Key violations
Do you have any fields with no  duplicates allowed?
0
 
LVL 1

Expert Comment

by:dssdb
ID: 10923708
Key violations are caused by duplicate information being inserted.  You may have data in your Suppliers table that already matches the SupplierContacts.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question