SQL Strings - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

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.