Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to find duplicate records joining two tables?

2889205Feb 20 2015 — edited Feb 23 2015

Hi all,

I'm looking for the correct syntax to pull back duplicate vendors based on 6 fields from two different tables. I want to actually see the duplicate vendor information (not just a count). I am able to pull this for one of the tables, something like below:


select *

from VendTable1 a

join ( select firstname, lastname

     from VendTable1

     group by firstname, lastname

     having count(*) > 1 ) b

on a.firstname = b.firstname

and a.lastname = b.lastname

I'm running into issues when trying to add the other table with the 4 other fields. Not sure how to do this? Please advise if possible!

Thank you!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2015
Added on Feb 20 2015
5 comments
1,846 views