PDA

Click to See Complete Forum and Search --> : Duplicate


SAMS
Nov 14th, 1999, 06:34 AM
Hi guys, I had this database which consists of duplicate invoices no. My question is how do i view those duplicate invoices no. only??
I'm using access. What is the SQL command to use.

Thks.

Mongo
Nov 14th, 1999, 08:42 AM
Assuming a table named YourInvoiceTable with an invoice number field named inv_num, the SQL query in Access/DAO could look something like this:

SELECT DISTINCTROW
First(inv_num)
, Count(inv_num)
FROM YourInvoiceTable
GROUP BY inv_num
HAVING Count(inv_num)>1;

SAMS
Nov 14th, 1999, 09:06 AM
Thks, it works.