Solved

append query key violations

Posted on 2004-04-26
2
459 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
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HasData 9 38
Access Runtime 2010 Error 17 33
MS Access Define a New Field Name In A Query When Special Characters Are Used In The Field Name 14 29
ms/access hyperlink/ftp 7 39
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now