15.10 - SPECIFIC 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
function_name
The specific name of the external UDF to be used to convert source_data_type to target_data_type. The specific_function_name must specify a unique function.
You cannot invoke an SQL UDF from a CREATE CAST or REPLACE CAST request.
If you do not specify a set of data types for a function name, then the specified function must be the only external UDF with that name in the database.
The specified function must satisfy the following conditions:
  • It can have only one parameter.

    Its parameter data type must be the same as source_data_type.

  • Its result data type must be the same as target_data_type.
  • It must be defined to be deterministic.
  • Its function name must identify an external UDF in the SYSUDTLIB database.

Example: Casting Source Data using a UDF

The following CREATE CAST request creates a cast operation that converts the source data type VARCHAR(32) to the target data type circle using the UDF having the specific function name VarcharTocircle.

     CREATE CAST (VARCHAR(32) AS circle)
     WITH SPECIFIC FUNCTION SYSUDTLIB.VarcharTocircle