17.05 - Example: Invoking an SQL UDF Within a Search Condition - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
vnq1596660420420.ditamap
dita:ditavalPath
hoy1596145193032.ditaval

You can invoke an SQL UDF within a WHERE clause search condition if the UDF returns a value expression.

This example shows a correct invocation of the SQL UDF value_expression within a WHERE clause.

     SELECT test.value_expression(t1.a1, t2.a2)
     FROM t1, t2
     WHERE t1.b1 = t2.b2
     AND   test.value_expression(t1.a1, t2.a2) = 10;