G
Guest
I am trying to query for duplicate cheques numbers (where the currency of the
cheque is the same). The following works when only a single currency is
involved.
Note the cheques are recorded in 2 tables [Cheques to Assignor] and Cheques
to Consultant].
SELECT ChequeNumber
FROM [Cheques to Assignor]
UNION ALL SELECT ConsChequeNumber
FROM [Cheques to Consultant];
SELECT First([Find Duplicate Cheques subquery].ChequeNumber) AS
[ChequeNumber Field], Count([Find Duplicate Cheques subquery].ChequeNumber)
AS NumberOfDups
FROM [Find Duplicate Cheques subquery]
GROUP BY [Find Duplicate Cheques subquery].ChequeNumber
HAVING (((Count([Find Duplicate Cheques subquery].ChequeNumber))>1));
Each cheque is associated with a [CURRENCYID]. How can I amend this coed
to ensure that duplicates are only found where the [CURRENCYID] field is the
same ?
Thanks.
cheque is the same). The following works when only a single currency is
involved.
Note the cheques are recorded in 2 tables [Cheques to Assignor] and Cheques
to Consultant].
SELECT ChequeNumber
FROM [Cheques to Assignor]
UNION ALL SELECT ConsChequeNumber
FROM [Cheques to Consultant];
SELECT First([Find Duplicate Cheques subquery].ChequeNumber) AS
[ChequeNumber Field], Count([Find Duplicate Cheques subquery].ChequeNumber)
AS NumberOfDups
FROM [Find Duplicate Cheques subquery]
GROUP BY [Find Duplicate Cheques subquery].ChequeNumber
HAVING (((Count([Find Duplicate Cheques subquery].ChequeNumber))>1));
Each cheque is associated with a [CURRENCYID]. How can I amend this coed
to ensure that duplicates are only found where the [CURRENCYID] field is the
same ?
Thanks.