Previous Topic: SET StatementsNext Topic: Arithmetic Result Syntax Diagram


Numeric Column Syntax Diagram

Purpose

You can set a temporary result to the value of a numeric column.

Syntax Diagram

The following is the syntax for the SET statement when you want to set the result to a numeric column.

►►─ SET ─ result ─┬─────────┬─ =numeric-column-name ──────────────────────────►◄
                  └─ (n.d) ─┘

Explanation

The following explains the keywords in the preceding format.

result

Assigns a name to the temporary result. A result name can be up to 32 alphanumeric characters. The first character of the name must be alphabetic.

(n.d)

Specifies the precision (the specific number of digits before and after the decimal) of the result, overriding the site default precision. (n.d) indicates that the result contains n integers and d decimals. The total of n + d cannot exceed 15 digits.

For example, (9.2) specifies a result with nine integer positions and two decimal positions. The total number of digits is 11.

numeric-column name

Indicates the name of a result in another SET statement or a non-floating-point numeric column defined to Datadictionary as part of a database table referenced in your query.

The letters N, B and D in the Datadictionary report and the letter N in the TYPE column of the extended column display indicate a numeric column.

If the column is from a table, as opposed to a temporary (SET-created) result, CA Dataquery assumes it is contained within the last table named in the query. If you want to specify a column within a table other than the last table named, you must qualify the column name by preceding it with the name of the table, for example, PAYROLL ACTIVITY-CODE. CA Dataquery assumes that each column specified after this qualifying table name is contained in that table.