Indicator Variables

Progress/ESQL supports NULL values in columns and expressions. Progress represents NULL (unknown) values with a question mark (?). However, because there is no data representation for NULL or unknown values in C, they are represented with indicator variables. Using indicator variables, you can exchange NULL values between host language variables of any data type and ESQL in a consistent manner.

NOTE: Progress/SQL provides the NULL keyword to represent NULL values in interactive SQL, and also provides indicator variables for the same purpose. Progress/SQL statements do not recognize the unknown value (?) as a literal expression.

Indicator variables also inform the host program that character string variables have been truncated (the database value is too long to fit in the host language variable). When a character string variable is truncated and an indicator variable is present, the actual length of the character column in the database is stored in the indicator variable.

An indicator variable provides information about a host language variable that is not representable in the host language variable value itself. In ESQL, indicator variables can represent:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095