I have a TRANSACT table with the following info:
I want to list(select) the acct_no being used by more than 1 person,
in this case its (1002).
Can u help me pls...
Sorry my mind does not work well these days...anyway im still trying.
Thanks a lot
I got it...
select acct_no,name from TRANSACT where (acct_no,name) in
(select acct_no,name from(select distinct acct_no,name from TRANSACT)
group by acct_no,name having count(*)>1);
Are there other better ones pls...
Is there a reason that you don't do this?
You don't need the distinct or the subquery.
SELECT acct_no, name
GROUP BY acct_no, name
this space intentionally left blank
im confused....i just thot this will hit this...
and not this one...
(Select distinct acct_no, name From Transact) A,
(Select distinct acct_no, name From Transact) B
A.acct_no = B.acct_no And
A.name <> B.name
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Click Here to Expand Forum to Full Width