FROM Clause
Use the FROM clause to specify the database table(s) from which you want your query to display data. You can use the FROM clause in its simplest form to query a single database table (as in the example below), or you can use the clause to perform more complex actions, such as joining two or more database tables.
Example:
To display data from the database points table, you might specify:
FROM
CDBPOINT
(To restrict the List to only those points that belong to a particular group, or that are of a particular point type, use the WHERE Clause to restrict the data that is retrieved from the table.)
For a list of the ‘standard’ database tables on your system, expand the System Tables entry (or, if applicable, the Data Grids entry) on the Queries Bar in ViewX. Alternatively, use the Database Schema. The Schema also includes information on historic pseudo tables and user defined tables. Such tables include:
- CDBEventJournal—The Event Journal.
- CDBHistoric—Point and Accumulator historic data.
- CForecastHistoric—Forecast historic data.
- Data Grid tables—These are user defined tables, see Configuring Data Grids.
- Data Table tables—These are user defined tables, see Configuring Data Tables.
- Historic Views—These are user defined tables, see Historic Views.
Further Information
For information on database tables in general, see the Geo SCADA Expert Guide to the Database.
Other historic tables: see Other Tables in the Geo SCADA Expert Guide to the Database.
For information on using the database Schema, see Working with the Database Schema in the Geo SCADA Expert Guide to the Database.
Further Information
Restrictions that apply to queries used for GIS Map Markers: see Designing Queries for GIS Map Markers in the Geo SCADA Expert Guide to Mapping and Geographic Information.