column-ref

Most of the fields that you retrieve from the database are presented as columns in the resulting query. You use column-ref to reference a column (database field), optionally qualified by a table and/or schema name. The column reference comprises the data type of the database field that the column represents (see Data Types).

Format

[[ Schema . ] Table . ] Column [ '[' ArrayIndex ']' ]

Remarks

Specifies a reference to a column. Column, Table, and Schema identifiers can be surrounded by double quotes to remove ambiguity with reserved words.

Elements of array columns can be obtained using the array element [] operator. The ArrayIndex can be any expression . The array index is always zero based, so the first element has an index value of 0.

Column references in expressions can use the de-reference operator "->" to retrieve the value of a column from the target of a reference column. See expr-column-ref for more information.

Some database fields have a special role (see Fields that Perform Special Functions in the ClearSCADA Guide to Lists). Such fields are not actually displayed as columns in the resulting query. You need to be aware of which 'special' fields you need to include in the comma-separated list in a SELECT clause, in order to obtain the query results and functionality that you require.

Example:

CurrentValue

"CurrentValue"

CPointAlg.CurrentValue

"CPointAlg"."CurrentValue"

Value[1]

Core.CGroup.Name


Disclaimer

ClearSCADA 2017 R3