Here is one way. In the future, please post your data in a consumable format so we cna help you better/fasterDECLARE @Foo TABLE(ID INT, Type CHAR(1), [Date] DATETIME)INSERT @Foo VALUES(17494,NULL,'2013-09-04 15:00:00.000'), (17577,NULL,'2013-09-04 15:00:00.000'), (17639,NULL,'2013-09-04 17:00:00.000'), (17701,NULL,'2013-09-04 17:00:00.000')UPDATE ASET Type = CASE WHEN RowNum = 1 THEN 'F' ELSE 'V' ENDFROM( SELECT *, ROW_NUMBER() OVER (PARTITION BY [Date] ORDER BY [Date]) AS RowNum FROM @Foo) AS ASELECT * FROM @Foo