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.
Printable View
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.
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;
Thks, it works.