A scalar UDF can be invoked from both the SET clause and the WHERE clause of an UPDATE request. See Example: UPDATE Using an SQL UDF Invocation in the SET and WHERE Clauses.
Clause | Usage rules are the same as those for invoking a scalar UDF from the … |
---|---|
SET | Select list of a SELECT request. You must use the alias to reference the result of a scalar UDF invocation that has an alias. |
WHERE | WHERE clause of a SELECT request. The scalar UDF must be invoked from within an expression that is specified as the search condition. Otherwise, the system returns an error. See WHERE Clause. |