15.10 - SQL and Host Variables - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

Declare host variables that will be used in SQL statements (that is, enclose host variables between BEGIN DECLARE/END DECLARE statements). Multiple declare sections are permissible. Variables declared elsewhere are not considered valid for SQL usage by PP2.

BEGIN DECLARE and END DECLARE are documented in “Embedded SQL” in SQL Stored Procedures and Embedded SQL (B035‑1148).

Variable names used in SQL requests are case sensitive; for example, VAR1 is not equivalent to var1.

Dynamic SQL, when executed in Teradata mode, returns a designation of character (452 or 453) to the SQLDA structure when a PREPARE...INTO or DESCRIBE is performed and no null terminator is supplied when the data is returned to the field.

Host variables that are not SQL strings represent data values only: they cannot be used to represent database, table, view, macro, or column names.