Archives of the TeradataForum
Message Posted: Fri, 13 Dec 2013 @ 17:41:51 GMT
<-- Anonymously Posted: Friday, December 13, 2013 12:34 -->
You can use a CASE expression to determine the updated value:
Set isourceid = CASE WHEN .... THEN 60 WHEN .... THEN 65 ... END
Note that you also need to include the WHEN conditions in the WHERE clause, to avoid updating all rows.
Or less efficiently, the CASE could have an "ELSE isourceid" to leave the value unchanged (even though the row is updated).
|Copyright 2016 - All Rights Reserved|
|Last Modified: 24 Jul 2020|