|
|
Archives of the TeradataForum
Message Posted: Thu, 25 Jan 2007 @ 09:21:42 GMT
Subj: | | Re: Problem setting the error_message in UDF |
|
From: | | Stegelmann, Rolf |
If you are on 5.1 UDFs are restricted to expressions (i.e., column references) in DML statements. That includes DML statements in stored
procedures. A UDF can also be used in the CHECK Boolean expression on a CREATE TABLE statement.
If you are on 6.0 or higher then scalar UDFs can also appear in stored procedure control statements, such as SET, IF, etc. In general a scalar
UDF can be used wherever a built in function can be used (SQRT for example). An aggregate UDF can be used wherever a built in aggregate function
can be used (SUM in a SELECT for example). A table UDF (6.1) can only be used in the FROM clause of a SELECT statement. Of course there are
probably some exceptions to the above where they can't be used that might be explicitly stated in the reference manual.
| |