Want to delete all rows from table except 1 that is the most recent.
This query works fine with SQL Server 2008 Standard edition:
DELETE S1
FROM StateLogs S1, StateLogs S2
WHERE S1.NodeId = S2.NodeId AND S1.NodeId = {0} AND S1.Modified < S2.Modified
But fails on SQL Server Compact Edition 3.5
There was an error parsing the query.
[ Token line number = 1, Token line offset = 11,Token in error = FROM ]
What is the equivalent for Compact edition?
EDIT
Table design http://pastebin.com/Akwpypkm