Progress
Embedded SQL-92
Guide and Reference


Query Expressions

Identify a list of expressions whose results form columns in a result table. This list of expressions is called a select list.

NOTE: This information on query expressions is specific to ESQL-92. For additional information on query expressions, see the Progress SQL-92 Guide and Reference .

SYNTAX

SELECT expression [ ’ column_title ’ ]  
  [ , expression [ ’ column_title ’ ] ] , ... ; 

expression

A column name from a table in the FROM clause or any expression that returns a value. An expression can also be any supported mathematical expression, scalar function, or aggregate function that returns a value.

column_title

Optionally, specifies a new heading for a column in the result table.

EXAMPLE

This example is a code fragment from the statsel function in sample program 2StatSel.pc. This example illustrates a query expression and the static processing of a SELECT statement. The complete source for the sample program is listed in "ESQL-92 Sample Programs."

EXEC SQL WHENEVER SQLERROR GOTO selerr ;
EXEC SQL DECLARE stcur CURSOR FOR  
     SELECT InvTransNum, Qty, OrderNum FROM PUB.InventoryTrans ;
EXEC SQL OPEN stcur ;
EXEC SQL WHENEVER NOT FOUND GOTO seldone ; 

NOTES

RELATED STATEMENTS

DESCRIBE Statements, SELECT Statement for a Single Row


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