Progress
Embedded SQL-92
Guide and Reference


DESCRIBE SELECT LIST Statement

Specifies that the DESCRIBE statement should write information about select list items in a prepared SELECT statement to an output SQLDA structure. Select list items are column names and expressions in a SELECT statement. A FETCH statement writes the values returned by a SELECT statement to the addresses stored in an output SQLDA.

A DESCRIBE SELECT LIST statement writes the number of select list items to the sqld_nvars field of an output SQLDA. If the sqld_size field of the SQLDA is not equal to or greater than this number, DESCRIBE writes the value as a negative number to sqld_nvars. Design your application to check sqld_nvars for a negative number to determine if a particular output SQLDA is large enough to process the current SELECT statement.

Design your application to issue a DESCRIBE SELECT LIST statement after the DECLARE CURSOR, PREPARE, and OPEN statements for a dynamic SELECT statement, but before the first corresponding FETCH statement for the cursor.

This is the syntax for a DESCRIBE SELECT LIST statement:

SYNTAX

EXEC SQL
  DESCRIBE SELECT LIST FOR statement_name INTO output_sqlda_name ; 

statement_name

The name of a SELECT statement to be processed using dynamic SQL-92 steps. Typically, this is the same statement_name as in the PREPARE statement.

output_sqlda_name

The name of the SQLDA structure to which DESCRIBE will write information about select list items.

AUTHORIZATION

None

SQL COMPLIANCE

SQL-92

ENVIRONMENT

Embedded SQL-92 only

RELATED STATEMENTS

PREPARE Statement, DECLARE CURSOR Statement, OPEN Statement, FETCH Statement, CLOSE Statement, DESCRIBE BIND VARIABLES Statement


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