DB2 graphic QMF Version 8

Columns

You use the Columns dialog to specify what columns will be included in the query results. By default, all the columns from a table that is included in the query are included in the query results. In the case where you have multiple tables included in the query, all the columns from each table will be included.

Select Query --> Add --> Columns or click the icon in Columns list box to specify the columns that will be included.

The following fields are available:

Table 19. Columns Dialog
Field Description
Table Lists the tables that are included in the query. If there are two or more tables, each table is prefixed by a letter, such as Q.STAFF(A) and Q.INTERVIEW(B).
Column Lists the columns for each table in the query
Type Lists the data type (character, numeric or time) for each column, such as:
SMALLINT NOT NULL
Label Lists any labels associated with the column.

Labels on columns are implemented as system column headings or column text. Column headings are used when displaying or printing query results.

Comments Lists any comments associated with the table, such as:
Employee identification number
Or, enter an expression here Use this field to enter a conditional expression that will determine whether a column is included in the query results. You can use the Expression Builder to help you build the expression.

The Expression Builder offers a palette of common elements used to create SQL expressions, such as column names, constants, functions, and operators. When you click the Expression Builder buttons, templates for expression elements are inserted into the expression fields.

You can invoke the Expression Builder by:

  1. pressing Alt + .
  2. clicking the browse icon to the right of the input field
Summary function Apply the summary function to the column.

QMF for Windows provides a number of summary functions, including AVERAGE, COUNT, MAXIMUM, MINIMUM, and SUM. The summary function must be compatible with the data type of the column.

New column name A new column name for a column that will be used in the query results. Usually, this is simpler name than the column name defined in the database.

Select a column from the Column list box, then type a new column name in the New column name field. The column will be renamed in the query results, such as SHIFTEND from A.ENDTIME.


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