Previous Topic: Step 4: Define Data Selection ConditionsNext Topic: Step 6: Select Columns for Temporary Result Calculation


Step 5: Name a Temporary Result

DQH90

=> PRESS <PF4> IF YOU DO NOT WISH TO DEFINE ANY TEMPORARY RESULTS --------------------------------------------------------------------------DQH90 DATAQUERY: DEFINE TEMPORARY RESULTS QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- ENTER THE NAME(S) OF ANY TEMPORARY RESULT(S) YOU WANT CALCULATED DURING QUERY EXECUTION. YOU MAY ALSO SPECIFY THE NUMBER OF DIGITS BEFORE AND AFTER THE DECIMAL POINT (THE PRECISION) OF EACH RESULT COLUMN. THE DEFAULT IS (13.2). ------------------------------------------------------------------------------- RESULT COLUMN NAME |PRECISION(N.D) ------------------------------------------------------------------------------- | | | | | | | | | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> CONTINUE <PF5> NOT USED <PF6> DISPLAY QUERY <PF7> NOT USED <PF8> NOT USED

Purpose

The optional DEFINE TEMPORARY RESULT panel lets you name and define value lengths for up to 10 temporary results. A result is calculated based on a formula you supply. Temporary result formulas can include values found in columns that exist on the database.

Concepts

These are the major concepts related to this panel:

Temporary Result
A value created for this report that is produced by an expression. The results can be printed or used in other calculations performed by CA Dataquery.

Precision (n.d)
Refers to the number of positions in the value before and after the decimal point (n.d). You can use the default of 13.2. If you decide to define the number of positions, be sure to specify a length that can contain the largest possible result. The sum of entries for n and d must be equal to or less than 18.

Panel Operation

On this panel, you use the Tab key to move the cursor from one field to another. There are two input fields per result, one under each heading. You type entries and press <PF4> CONTINUE (or ENTER) to display the next panel and define the temporary result you just named.

Completed Example

The following sample shows how the completed DEFINE TEMPORARY RESULT panel is used to name the temporary result.

=> PRESS <PF4> IF YOU DO NOT WISH TO DEFINE ANY TEMPORARY RESULT --------------------------------------------------------------------------DQH90 DATAQUERY: DEFINE TEMPORARY RESULTS QUERY NAME: USER-SAMPLE ------------------------------------------------------------------------------- ENTER THE NAME(S) OF ANY TEMPORARY RESULT(S) YOU WANT CALCULATED DURING QUERY EXECUTION. YOU MAY ALSO SPECIFY THE NUMBER OF DIGITS BEFORE AND AFTER THE DECIMAL POINT (THE PRECISION) OF EACH RESULT. THE DEFAULT IS (13.2). ------------------------------------------------------------------------------- RESULT NAME |PRECISION(N.D) ------------------------------------------------------------------------------- SHIP-PRICE | 13.2 | | | | | | | | ------------------------------------------------------------------------------- <PF1> HELP <PF2> RETURN <PF3> NOT USED <PF4> CONTINUE <PF5> NOT USED <PF6> DISPLAY QUERY <PF7> NOT USED <PF8> NOT USED

This chart explains each entry/selection.

Field or Item

Sample Entry or Selection

Reason

RESULT COLUMN NAME

 

SHIP-PRICE

Will contain results of quantity multiplied by price for each item ordered. Be sure to see Restrictions on Names for important restrictions on names.

PRECISION (N.D)

No entry

Without knowing what the largest quantity or highest price would be, the default is a good choice.

Options

You could name temporary results that are the results of calculations based on other temporary results.

To Go to the Next Step

When the Define temporary results panel is complete, the next panel tells CA Dataquery which columns to use to calculate the values. The next step is to select those columns and tell CA Dataquery to multiply them.