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 further information on the FROM clause, and for more detailed information on SQL in general, see the SQL Technical Reference online Help.
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 in the ClearSCADA Guide to Core Configuration).)
- Data Table tables—(These are user defined tables (see Configuring Data Tables in the ClearSCADA Guide to Core Configuration).)
- Historic Views—(These are user defined tables (see Historic Views in the ClearSCADA Guide to Server Administration).)
Further Information
For information on database tables in general, see the ClearSCADA Guide to the Database.
Other historic tables: see Other Tables in the ClearSCADA Guide to the Database.
For information on using the database Schema, see Working with the Database Schema in the ClearSCADA Guide to the Database.