I have the same issue listed in this SO question, but I have tried the solution and I am getting a SQL error 1288- I'm thinking I am poorly translating SQL server to SQL or this method has been deprecated. Is there a current way of doing this?
I need to Order By a column to then iterate through my new column, adding a new order and better upkeep for future inserts and deletes. My current SQL query for updating the new column looks like this ( same as the given solution above ):
With cte As
(
SELECT ColumnToOrderBy,NewColumn,
ROW_NUMBER() OVER (ORDER BY ColumnToOrderBy) AS i
FROM TableToUpdate
)
UPDATE cte SET NewColumn=i