Teradata UPDATE FROM syntax using row Number
Solution:
Here's the teradata update from syntax. You have to specify the row_number in the inner derived table
\n\nUPDATE TargetTable\nFROM\n (\n SELECT text_id,\n (SELECT MAX(ID) FROM serviceClusters) +\n ROW_NUMBER() OVER (ORDER BY Text_ID) AS newID \n FROM TargetTable\n ) AS src\nSET ID = newID\nWHERE TargetTable.Text_ID = src.Text_ID\n
dan-irving
posted onEnjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds
Post Comment