Delete Query from Same Table Not Working

Joined
Jul 26, 2012
Messages
1
Reaction score
0
Hi guys,

i've been trying all day to get this delete query working to no avail.

I'm trying to remove all duplicates from the same table.

i've tried the two below options;

This one just hangs

DELETE *
FROM [Copy Of Assets] AS A
WHERE Serial <

(
SELECT MAX(Serial)
FROM [Copy Of Assets] AS B
WHERE A.Serial = B.Serial
);


this one promts me to delete the exact amount of unique values there are, i know i've missed something simple but not 100% what

DELETE DISTINCTROW A.*
FROM [Copy Of Assets] AS A
INNER JOIN [Copy Of Assets] AS B ON [A].[serial] = .[serial];
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top