Rules for Using a Scalar UDF in an UPDATE Request - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Rules for Using a Scalar UDF in an UPDATE Request

A scalar UDF can be invoked from both the SET clause and the WHERE clause of an UPDATE request. See “Example 13: UPDATE Using an SQL UDF Invocation in the SET and WHERE Clauses” on page 489.

 

FOR this clause …

THE usage rules are the same as those for invoking a scalar UDF from the …

SET

select list of a SELECT request.

See “Invoking a Scalar UDF From a SELECT Statement” on page 19.

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, Teradata Database aborts the request and returns an error.

See “WHERE Clause” on page 101.