Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append query problem ???

Status
Not open for further replies.

andrep

Technical User
Feb 27, 2002
40
CA
When i try to append the data to the other table i get key violations!
Yet i have no key fields in the destination table ???

Any ideas !
Thanks
 
I need to see your SQL Statement to help with that. Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!
 
INSERT INTO Vente ( [Code client], [N° commande], [Date commande], SousTotal, SumOfTps, SumOfTvq, SumOftotal, Balance )
SELECT Commandes.[Code client], Commandes.[N° Commande], Commandes.[Date commande], Sum(CCur([Prix unitaire]*[Quantité])) AS SousTotal, Sum([Détails commandes].Tps) AS SumOfTps, Sum([Détails commandes].Tvq) AS SumOfTvq, Sum([Détails commandes].total) AS SumOftotal, Sum([Détails commandes].total) AS SumOftotal1
FROM Commandes INNER JOIN [Détails commandes] ON Commandes.[N° Commande] = [Détails commandes].[N° Commande]
GROUP BY Commandes.[Code client], Commandes.[N° Commande], Commandes.[Date commande];

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top