SQL_TEXT Definition - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
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.