SQL_TEXT Definition - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

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

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 PROCEDURE statement to create the external stored procedure.

IF you use the CREATE PROCEDURE statement when the current server character set is … THEN the C or C++ function must set SQL_TEXT to …
KANJI Kanji1_Text
KANJISJIS Kanjisjis_Text
LATIN Latin_Text
UNICODE Unicode_Text

SQL_TEXT is used for specific arguments when the external stored procedure uses parameter style SQL. For details on parameter styles, see External Stored Procedure Parameter List.

Vantage remembers the character set the procedure was created under so that the procedure can translate SQL_TEXT input arguments to the expected text and translate text to SQL_TEXT output arguments, no matter who calls the procedure and what the current server character set is for the session.

In accordance with Teradata internationalization plans, KANJI1 support is deprecated and is to be discontinued in the near future. KANJI1 is not allowed as a default character set; the system changes the KANJI1 default character set to the UNICODE character set. Creation of new KANJI1 objects is highly restricted. Although many KANJI1 queries and applications may continue to operate, sites using KANJI1 should convert to another character set as soon as possible.