farzinmonsef / testNEW

0 stars 0 forks source link

Checking_Duplicated #25

Open farzinmonsef opened 8 years ago

farzinmonsef commented 8 years ago

Check find DUPLICATED

farzinmonsef commented 8 years ago

With Cte As (select Row_Number() over (partition by TableX.Fld1, TableX.Fld2, TableX.Fld3 Order by (Select 0)
) RN, * From TableX (NoLock) ) Select Top 10 From Cte Where RN > 1 Order by TableX.Fld4 Desc