SamirNaenenjad
Programmer
I need to make a composite key in a table, and of course I can't do that until I have deleted the duplicate keys already there. Is there any way to do this with an SQL statement? I can select the records to delete with:
SELECT [Account_ID] & [CowID] FROM tblCowEvaluation
GROUP BY [Account_ID] & [CowID]
HAVING COUNT([Account_ID] & [CowID]) > 1
but when I try
DELETE * FROM tblCowEvaluation
GROUP BY [Account_ID] & [CowID]
HAVING COUNT([Account_ID] & [CowID]) > 1
the DELETE * won't jive with the grouping. Any thoughts? Is there a different approach I can take?
Thanks for any help,
A.J.
SELECT [Account_ID] & [CowID] FROM tblCowEvaluation
GROUP BY [Account_ID] & [CowID]
HAVING COUNT([Account_ID] & [CowID]) > 1
but when I try
DELETE * FROM tblCowEvaluation
GROUP BY [Account_ID] & [CowID]
HAVING COUNT([Account_ID] & [CowID]) > 1
the DELETE * won't jive with the grouping. Any thoughts? Is there a different approach I can take?
Thanks for any help,
A.J.