DB2 graphic QMF Version 8

Adding Calculated Columns to the query results

A calculated column is a column of data that is created and added to the query results. The contents of the new column is based on an expression that you define. The expression can use data from other columns, constants and variables.

You use the Calculated Columns window to add a calculated column to the query results. You can open the Calculated Columns window by:

The expression used to calculate the value of the added column is saved with the query. The calculated column will be included in the query results each time the query is run.

Table 29. Calculated Columns dialog
Field Description
Name Use this field to specify the name for the new column as it should appear in the query results.
Expression Use this field to specify the conditional expression. You must follow the rules for building conditional formatting expressions.

The expression language supports constant expressions, expressions defined as variables sourced on other columns in the result set (&1, &2, for example), numeric operators (such as +, -, *, /), character operators (+, CONCAT), numeric and character functions (such as MIN, MAX, AVG, SQRT, CONCAT, SUBSTR), and a set of logical and relational operators (such as >, <, =, !=)

Note:
For more information on the expression language refer to QMF for Windows online help.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004