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

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

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.