One more option
UPDATE x
SET x.CODE_DEST = x.New_CODE_DEST
FROM (
SELECT CODE_DEST, ROW_NUMBER() OVER (ORDER BY [RS_NOM]) AS New_CODE_DEST
FROM DESTINATAIRE_TEMP
) x
More Related Contents:
- Update a table using JOIN in SQL Server?
- Create a view with ORDER BY clause
- How to run the same query on all the databases on an instance?
- How to write UTF-8 characters using bulk insert in SQL Server?
- Is a single SQL Server statement atomic and consistent?
- Connecting to MS SQL Server with Windows Authentication using Python?
- determining the character set of a table / database?
- How to query for Xml values and attributes from table in SQL Server?
- A connection was successfully established with the server, but then an error occurred during the login process. (Error Number: 233)
- Should every User Table have a Clustered Index?
- cross apply xml query performs exponentially worse as xml document grows
- How to split a string after specific character in SQL Server and update this value to specific column
- SQL Server Configuration Manager cannot be found
- Compute MD5 hash of a UTF8 string
- Sql Server replication requires the actual server name to make a connection to the server
- Convert a string with ‘YYYYMMDDHHMMSS’ format to datetime
- Convert from DateTime to INT
- replace NULL values with latest non-NULL value in resultset series (SQL Server 2008 R2)
- SQL Server 2008 Spatial: find a point in polygon
- What do Clustered and Non-Clustered index actually mean?
- Regex pattern inside SQL Replace function?
- How can I clear the SQL Server query cache?
- WHERE Clause vs ON when using JOIN
- What is a free tool to compare two SQL Server Databases? [closed]
- #DELETE viewing SQL Server table in Access
- Get ROWS as COLUMNS (SQL Server dynamic PIVOT query)
- SQL Server (localdb)\v11.0 explained
- SQL Server equivalent to Oracle’s CREATE OR REPLACE VIEW
- Using Full-Text Search in SQL Server 2008 across multiple tables, columns
- Oracle sequence but then in MS SQL Server