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 .
Teradata Database 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.