I have a table where I want to update a column with the value in another column in the previous row.
I want to do something like this.
UPDATE myTable as b SET prev=(SELECT top 1 myField FROM myTable
WHERE rowID<b.rowID ORDER By rowID Desc)
Any ideas?
Note: I'm using Access/SQL server. I am getting an error 'operation must use an updatable query'.
Note2: The solution from How do I UPDATE from a SELECT in SQL Server? doesnt work.