16.20 - Example: Creating a Java Scalar Function - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

The following request creates a Java scalar UDF named judf_cref012003:

     CREATE FUNCTION judf_cref012003 (
        par1 BIGINT)
     RETURNS BIGINT
     CAST FROM INTEGER
     SPECIFIC judf_cref012003
     LANGUAGE JAVA
     NO SQL
     PARAMETER STYLE JAVA
     NOT DETERMINISTIC
     CALLED ON NULL INPUT
     EXTERNAL NAME 'UDF_JAR:UserDefinedFunctions.mybigint(long) 
                    returns int';