fryguy5049
Technical User
Using MySQL 4
I am trying to query all duplicate occurences of an account # (acct)in my DB. This is the command I have so far:
SELECT cd71.amt ,cd71.acct ,cd71.date, store
from cd71
where cd71.acct=cd71.acct and cd71.date >'2004-09-20' and cd71.tran ='253' and cd71.amt >1000
group by cd71.acct having count(*)>1;
This almost works, but it only lists one instance on the duplicate. How can I get the command to list each row that is a duplicate? Thanks
I am trying to query all duplicate occurences of an account # (acct)in my DB. This is the command I have so far:
SELECT cd71.amt ,cd71.acct ,cd71.date, store
from cd71
where cd71.acct=cd71.acct and cd71.date >'2004-09-20' and cd71.tran ='253' and cd71.amt >1000
group by cd71.acct having count(*)>1;
This almost works, but it only lists one instance on the duplicate. How can I get the command to list each row that is a duplicate? Thanks