Solved

append query key violations

Posted on 2004-04-26
2
486 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 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

739 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