Progress
Embedded SQL-92
Guide and Reference
Using Indicator Variables with OUTPUT Host Variables
To use indicator variables to determine if a returned value is a NULL value, you associate an indicator variable with an output host variable. For example, you can use an indicator variable in the INTO clause of a SELECT statement.
These are the general steps for using indicator variables with OUTPUT host variables:
- DECLARE host variables and an indicator variable in the DECLARE SECTION.
- Execute the embedded SQL SELECT statement with an INTO clause using an OUTPUT host variable and its associated indicator variable.
- Examine the indicator variable email_i to determine if the fetched value is NULL.
- Report the result of the fetch operation.
Table 3–3 describes how you might use indicator variables and INPUT and OUTPUT host variables in the INTO clause of a SELECT statement.
EXAMPLE
The code fragment in the following example shows how to declare and use indicator variables with the INTO clause of a SELECT statement:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |