0% found this document useful (0 votes)
42 views

Duplicate Invoices

This SQL query selects the document number, product code, package code, minimum unit price, and count of records from a table where the document group number is 0, groups the results by document number, product code, and package code, and only returns groups that have a count of more than 1 record.

Uploaded by

Adil Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Duplicate Invoices

This SQL query selects the document number, product code, package code, minimum unit price, and count of records from a table where the document group number is 0, groups the results by document number, product code, and package code, and only returns groups that have a count of more than 1 record.

Uploaded by

Adil Ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

select rpdoc,rpdct,rpkco ,min(rpicu) , count(*)

from (select distinct rpdoc,rpdct,rpkco,rpicu


from proddta.f03b11 where rpVDGJ=0)
group by rpdoc,rpdct,rpkco
having count(*)>1
;

You might also like