Previous Topic: (DQIA0) Define Expression: Select ColumnsNext Topic: (DQIE0) Ordering Rows: PRIORITY


(DQIB0) Define Expression: Write Statement

=> Enter definition for Expression 01. Press <PF1> for help. --------------------------------------------------------------------------DQIB0 DATAQUERY: DEFINE EXPRESSION: WRITE STATEMENT QUERY NAME: _______________ ------------------------------------------------------------------------------- Write an arithmetic expression to be used in calculating the value of an output column. Use the column numbers, F01, F02, and so on, numeric literals, or a combination of both and arithmetic operators. The default expression appears below. You can type over it to change it. => ___________________________________________________________________________ ------------------------------------------------------------------------------- NUMBER| TABLE NAME/COLUMN NAME | DESCRIPTION ------------------------------------------------------------------------------- | | | | | | | | | | | | | | | | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NEW COLUMN <PF4> CONTINUE <PF5> EXTEND COLUMN <PF6> DISPLAY QUERY <PF7> BACKWARD <PF8> FORWARD

Description

Use this SQL Mode Guided Query panel to define an expression for use in an output row.

Action

Type an algebraic equation in the => field that can be included in the SELECT statement. Use numbers shown on the panel to represent column names. The equation can be simple or complex and can also define a character literal.

You can also type the name of any column that fits on the line following the =>. You are not limited to only previously selected columns. However, if you misspell the name, CA Dataquery does not check it here. You can also write any valid portion of a SELECT clause in the field.

You can enter a comma-separated statement in the => entry field and you can also enter a column function. Column functions are discussed in the CA Dataquery User Guide. An example of a valid entry of this type is:

'Average Salary is: $', AVG(SALARY)

Press <PF3> NEW COLUMN to define another expression, if needed. Press <PF4> CONTINUE to go to the next step.

Display Fields

Refer to the following for explanations of the display field intended to contain variable data.

QUERY NAME:

Name assigned this query with the first Guided panel.

Entry Fields

Refer to the following chart for valid entries in the fields on this panel. Use the Tab and arrow keys to move the cursor. To change an entry, write or space over it. When entries are complete, press Enter or a valid PF key.

Field

Required?

Valid Entries

Default

Default expression

Y

Algebraic equation
with column numbers, numeric literals, character literals, arithmetic operators,
or parentheses

Addition of all columns

Columns

Refer to the following for a discussion of each column on this panel.

NUMBER

Number CA Dataquery has assigned each numeric column you selected for use in structuring your calculation.

TABLE NAME/ COLUMN NAME

Names of the columns you selected for use in structuring your calculation, along with their table names.

DESCRIPTION

Datadictionary description of each column you selected for use in structuring your calculation.

PF Keys

The following lists the PF keys for this panel, with a brief description of each function.

<PF1> HELP

Displays Help information about the current panel.

<PF2> RETURN

Returns to Select Columns for Calculation (DQHA0) panel.

<PF3> NEW COLUMN

Displays a new DQIB0 panel to write another statement.

<PF4> CONTINUE

Displays the next Guided Query panel when this one is complete. (Returning to this panel from a later panel will require that you redisplay any entry to save it again.)

<PF5> EXTEND COLUMN

Displays the extended column definition for key/column selected by cursor.

<PF6> DISPLAY QUERY

Displays the query created so far.

<PF7> BACKWARD

Displays a previous screen, if any.

<PF8> FORWARD

Displays next panel, if any.