Delete Every Alternate Row in SQL

Viewed 13854

I need to clean up a table which has three columns, ID (uniqueidentifier), Observation (nvarchar), and Timestamp (datetimeoffset). The content is generated by two sensors at 1 hour interval, and the value of Observation is the same from the two sensors. My idea is to do a SELECT query such as

SELECT * FROM [Records] ORDER BY [Timestamp]

and then delete every alternate row.

I found this on SO how to delete every alternate row in access table, but doesn't really applies here as the ID is not Int but UID.

A sample of the data would look like:

enter image description here

4 Answers
Related