Progress
Embedded SQL-92
Guide and Reference
Using SQL for Computation
You can use an SQL SELECT statement to perform computations in an ESQL program by using the syscalctable system table for computations. This system table has owner sysprogress and contains exactly one row with a single column.
EXAMPLEThe following example illustrates using the syscalctable system table for computations.
NOTE: For a computation operation you can use any table that contains exactly one row. sysprogress.syscalctable is a table with exactly one row.The expression in the SELECT list can contain constants or host variables and can include scalar functions.
EXAMPLEThe following examples show some of the ways you can use the SELECT statement to perform computations:
Using the syscalctable system table provides flexibility and eases the evaluation of expressions, especially when the expressions involve values for NUMERIC, DATE, or TIME. See Appendix B, “Progress SQL-92 System Catalog Tables,” in the Progress SQL-92 Guide and Reference for information on the syscalctable system table and all system tables.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |