Click here to Skip to main content
15,900,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hai friends,

i have table in sqlserver ,in their exits duplicates,

my requerement is find the duplicates and spceifid in another column .
brifly
in first column one exists if in case it had duplicate beside column shows 1,no duplis beside column shows 0
Posted

SQL
select FIELDNAME, case count(FIELDNAME) when 1 then 0 else 1 end as Duplicate
from TABLENAME
group by FIELDNAME


This is a simple way to achieve what you have asked, but whether it's what you want or not is up to you!!
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900