Column references refer to columns in one of the query's data sources, defined in the FROM clause.
Column references within CCL clauses in the Query statement, Database statement, and Remote Procedure statement must refer to columns in one of the query's data sources, defined in the FROM clause. Column references in clauses of the Delete statement and Set Variable statement must refer to the data stream or named window specified in the ON or DELETE FROM clauses.
In cases where the column reference may refer to more than one entity, column references must explicitly state the entity to which the column belongs, using the syntax
stream-or-window-name . column-name
or
alias . column-name
where stream-or-window-name is the name of the data stream or window identified elsewhere in the statement, and alias is the alias assigned to a data stream, named window, database subquery, remote subquery, or CCL subquery by the AS subclause of the FROM clause.
One of these syntax forms for column references is required when:
A query includes multiple data sources, and the column name is contained in more than one of these data sources.
The same column in the same data source is referenced multiple times. In this case, every instance of the column reference must include a unique data source alias.
The data source to which the column reference is referring is not a data stream or window.