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

best

  The phrase "Everything should be made as simple as possible, but not simpler" is a quote by Albert Einstein, meaning that  while...