With tb as ( Select ROW_NUMBER() over(PARTITION by Emp_Code,ProjectName order by emp_code,Worktype desc) as Srn,* From TestEmp ) Delete From tb Where Srn>1 And WorkType='Non Production'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)