15.00 - Using the AS ASSIGNMENT Clause To Make a Cast Operation Implicitly Invokable - Teradata Database

Teradata Database SQL Data Definition Language Detailed Topics

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1184-015K
Language
English (United States)

Using the AS ASSIGNMENT Clause To Make a Cast Operation Implicitly Invokable

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 Utilities for details. 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.

See Utilities: Volume 1 (A-K) for information about setting the value for the DBS Control DisableUDTImplCastForSysFuncOp parameter.