Before you include the sqltypes_td.h header file, you must define the SQL_TEXT constant. The value that you use must match the current server character set of the session in which you use the CREATE FUNCTION statement to create the UDF.
| Server Character Set | SQL_TEXT Setting in CREATE FUNCTION Statement |
|---|---|
| KANJI | Kanji1_Text |
| KANJISJIS | Kanjisjis_Text |
| LATIN | Latin_Text |
| UNICODE | Unicode_Text |
SQL_TEXT is used for specific UDF arguments when the UDF uses parameter style SQL. See Scalar Function Parameter List, Aggregate Function Parameter List, and Table Function Parameter List.
Vantage remembers the character set the UDF was created under so the UDF can translate SQL_TEXT input arguments to the expected text and translate text to SQL_TEXT output arguments, no matter who calls the UDF and what the current server character set is for the session.
In accordance with Teradata internationalization plans, KANJI1 support is deprecated. The system changes the KANJI1 default character set to the UNICODE character set. Creation of new KANJI1 objects is highly restricted. Although KANJI1 queries and applications may continue to operate, Teradata recommends that sites using KANJI1 convert to another character set as soon as possible.