I have 4 tbls , TBL1, TBLB, TBLC and TBLD... All these 4 tbls have an accoutnnumber field, which should be unique between all these 4 btls.
How, do I check to see if any acctnumbers are present in more than 1 of these 4 tbls
I used an inner join , but that ONLY Looks for accts, that are repeated in ALL These 4 tbls. Heres the qry I used:
What I need to see is if a acct is repeated Between ANY Of these tbls, it should return that acct as a duplicate.
Pl advise how I can do that:
select * FROM TblA a
inner join TblB cr
on cr.acctno=a.acctno
inner JOIN TblC fc
on fc.acctno=a.acctno
inner join TblD r
on r.acct#=a.acctno