SQLTeam.com | Weblogs | Forums

Row Compare


#1

How to find non common data.

Output Should be only non repeated data
TestPolicy Date
CPS2012R2BASEOS 1/22/2016
CPS2012R2BASEOSPolicy 1/27/2016
CPSCORPSQL200820122014 1/22/2016
CPSCORPSQL200820122014Policy 1/27/2016
OUPolicy 1/22/2016
Test_Droped_New 1/27/2016


#2
SELECT   TEST_Poliy
FROM     yourtable
GROUP BY TEST_Poliy
HAVING COUNT(*) = 1

#3

I'm not able to pull date column.


#4
SELECT   TEST_Poliy, MIN ( [Date] ) AS [Date]
FROM     yourtable
GROUP BY TEST_Poliy
HAVING COUNT(*) = 1

#5

Awesome! Thanks.