table-ref

A reference to a database table with an optional alias

Format

TableName [ UNION TableName ]* [ AS Alias ]

Remarks

A union of one or more database tables with an optional alias.

This form of UNION allows data sources to be combined in the FROM clause:

SELECT ColRef FROM TableName UNION TableName

The following restrictions apply:

Take care when adding WHERE clauses to reference fields which, when appearing in both tables, are defined separately in their class hierarchies. Such comparisons should not check for null references by comparing with -1, but should instead check for less than zero.

 

SELECT

FULLNAME, ID, OUTSTATIONID

FROM

CDNP3ANALOGIN UNION CDNP3BINARYIN

WHERE

( OUTSTATIONID < 0 )

ORDER BY

FULLNAME ASC

 

Note that the comparison in the above syntax is '< 0' and not '= -1'.

INTERSECT and EXCEPT operators and UNION JOIN are not supported.


Disclaimer

Geo SCADA Expert 2022