15.10 - Example: Creating a Java Scalar Function - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

prodname
Teradata Database
vrm_release
15.10
created_date
December 2015
category
Programming Reference
featnum
B035-1144-151K

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