WITH CTE AS
(
SELECT MyStatus,ROW_NUMBER() OVER
(PARTITION BY [EmployeeID]
Order BY [EmployeeID] )
AS RowNumber,
[EmployeeID]
FROM [dbo].MYTABLE tbl )
--DELETE FROM CTE Where RowNumber > 1
--SELECT * FROM CTE Where RowNumber > 1
update CTE set eligstatus='DP'
where RowNumber > 1
GO
Friday, September 17, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment