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
Related posts:
Find numbers with more than two decimal places in SQL
How to check for 'IS NOT NULL' And 'IS NOT EMPTY' string in SQL
Replace duplicate spaces with a single space in SQL
SQL Server CONCAT_WS Function (Concat with Separator)
How to concatenate text from multiple rows into a single text string in SQL server?