15.10 - SQL Strings - 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

Define the variable name used for a SQL string as either a character or varying character type. See “Host Variable Declaration” on page 112 for details on declaring character fields.

PP2 expects a terminating null character (a ‘\0’) if a character string variable is used as a SQL string. The code is generated based on the presence of the ‘\0’ in the string.

The ‘\0’ is not used, however, when a varying character variable is used as a SQL string. Use of a character string variable as a SQL string is a PP2 extension over DB2 rules, although any DB2 conforming SQL string is valid.