Removing duplicates (Handy)

   

--delete x from
   select * from
     (
      select *,  rn=row_number() over (partition by amount, number order by id)
      from [exTable]
      --where exTable.number = '1019351'
    ) x
    where rn > 1;

Comments

Popular posts from this blog

Asp.net Publishing Broke Site - "App_WebReferences is not allowed because the application is precompiled"

Telerik - Custom Group Footers In RadGrid