Expressions.expr-column-ref

A reference to a column in an expression.

A column might comprise another expression, or a reference to a database field.

Format

column-ref [ -> ColumnName ]*

Remarks

column reference in an expression consists of a column-ref, optionally followed by one or more de-reference operators.

The de-reference operator "->" returns a value from the target of a reference column.

As a dynamic list update is not supported for de-referenced columns, a list is not refreshed automatically.

Example:

1. Examples of column references used in expressions:

CurrentValue

"ParentGroupId"->FullName

Id->FullName

2. Example of de-reference operator used to avoid the need for a join:

SELECT ParentGroupId->Name, Name

FROM CPointAlg

3. There is a known limitations when using the de-reference operator in the WHERE clause of a historic query, for example the following query will be blocked:

SELECT *

FROM CDBHistoric

WHERE Id->FullName LIKE 'My Points.%'

The query processor currently doesn't recognize the de-reference operator as optimizable. The access plan for the above query would be full table scan, which would be blocked as an unconstrained historic search.


Disclaimer

Geo SCADA Expert 2020