Hi Champs,
I am trying to either UPDATE or add a new column with ROWNUMBER() OVER an column on a table
table:ID------Col2----Col3---1-------12---------1 1-------34---------22-------44---------12-------75---------22-------77---------33-------23---------13-------33---------24-------44---------14-------22---------2
I know I can get Col3 right with an SELECT and ROWNUMBER() OVER, but how can I UPDATE the table with the result?
/Many thanks
DROP
GO
CREATE
(
IDCol
ValueCol
RANKCol
)
INSERT
UPDATE
SET
FROM
INNER
SubQuery
AND
SELECT
Thank you!