Single Character Data - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

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

Single Character Data

A character host variable is defined as a single character field with no terminating null character ('\0'). The C definition for such a field is:

char   var1;

Do not use brackets when defining a single character field; their use invalidates the variable for use in a SQL statement.

When data is returned to a single character field, a maximum of one byte is returned (truncation occurs if the Teradata Database field is larger, warning flags are set and (if present) the indicator variable is set). No '\0' is present, which is equivalent to a data type of 452 (453 if nullable), with a length of 1.

DATE values might not be returned to this type of host variable because the field is not long enough.