Thursday, 7 March 2024

remove duplicates

 Begin Tran DPID;

with EmCTE As(

select *, Row_number() over(Partition By Approver_Level order by Approver_Level ) as RowNumber

from [dbo].[tbl_WorkFlowProgress]

where AFINumber ='2024MSVTR00160' 

)

select * from EmCTE

INC2244251


DELETE from EmCTE where RowNumber >1

No comments:

Post a Comment

c#

 https://github.com/dcyuksel/Result