Using the ASSIGNMENT Clause | CREATE CAST | Teradata Vantage - 17.10 - Using the AS ASSIGNMENT Clause To Make a Cast Operation Implicitly Invokable - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Detailed Topics

Advanced SQL Engine
Teradata Database
Release Number
July 2021
English (United States)
Last Update

You can make a user-defined cast implicitly invokable by including the AS ASSIGNMENT clause in its CREATE CAST statement. When you define a cast operation in this way, the system implicitly invokes the cast for all assignment operations. An assignment operation is defined to be an INSERT, MERGE, UPDATE, or parameter passing operation.

You can disable this functionality by setting the DisableUDTImplCastForSysFuncOp DBS Control flag to TRUE. The default value for this flag is FALSE, meaning that implicit casting is enabled. See Teradata Vantage™ - Database Utilities, B035-1102. This action disables implicit UDT-to-predefined data type casts for built-in system functions and operators.

If DisableUDTImplCastForSysFuncOp is set to 0x01 and you attempt to pass a UDT into a built-in system function or operator, an error is returned to the requestor.

This flag only affects built-in system functions and operators. The system continues to invoke implicit casts for insert and update operations and for parameter passing with respect to UDFs, methods, and stored procedure operations when the DBS Control DisableUDTImplCastForSysFuncOp parameter is set to FALSE.

For information about setting the value for the DBS Control DisableUDTImplCastForSysFuncOp parameter, see Teradata Vantage™ - Database Utilities, B035-1102.