17.05 - Example: Creating a Java Scalar Function - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

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';