Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Find duplicates from different tables

$
0
0

I need to write a  sql query to   find out in which table holds the duplicate data.

Duplicate : AAA company should be present(mapped) only once with XXX Partner. If it is repeated then would be considered as duplicate

Please help in  writing this query

Table A                                             Table B                                             Table C 

company  Partners                    company  Partners                                    company  Partners     

AAA        XXX                                AAA      XXX                                                   AAA      XXX

BBB       YYY                                  BBB      YYY                                                    BBB     YYY

AAA       XXXX (duplicate Data)

Expected o/p :

table A contains duplicate data , or Table B contains Duplicate Data ETc...


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>