How to Delete duplicate row access 2003


Joined
Jan 25, 2016
Messages
1
Reaction score
0
I am trying to delete the duplicate row and keep the last one. But I failed the sql code is as under
SELECT First(bill.CustNo) AS [CustNo Field], Count(bill.CustNo) AS NumberOfDups, Min(bill.UnitsPrev) AS MinOfUnitsPrev, Min(bill.PayinDueDate) AS MinOfPayinDueDate, Min(bill.AfterDueDate) AS MinOfAfterDueDate, bill.CustNo
FROM bill
GROUP BY bill.CustNo
HAVING (((Count(bill.CustNo))>1));

I have 33 fields and I can not put all the fields in the query as min(). When I put min then the duplicate row not displaying the exact record. on the above sql statements. But on the basis of the above fields its ok displaying the correct duplicate records.
How I delete the entire rows from the table. I have only one table and need to delete the duplicate row.
Thanks
 
Ad

Advertisements


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

Similar Threads


Top