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

Finding duplicate records from two tables

$
0
0

I have  table T1 with more than 1000 Records and there are few dulpicates in this table T1


SELECT segment, LandUseGroup, StateAbbreviation,Unit  FROM  T1
WHERE EXISTS
(
SELECT  Sc_id, bMP_ID,segment, LandUseGroup,S.StateAbbreviation,U.Unit
FROM T2 --- i have this table with results from joining few tables
)


i have to find if there are any duplicates with combination of segment, LandUseGroup, StateAbbreviation,Unit with the Bmp_id in T2

Please suggest me

Bottom line is :
BMP_id record submitted as a percent( in T1)  do not overlap with any other records for that same BMP on the same landuse in the same Segment

 

Viewing all articles
Browse latest Browse all 23857

Trending Articles