SQL statements
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client OLEDB 2021
- Developer
SQL statements are commands used to query information from the linked data source. For a complete guide to Transact-SQL, see the Microsoft help topic, Transact-SQL Reference (Database Engine). For details about RTQP-specific syntax, available operations and functions, RTQP metadata, table and table-valued function structures, and table and table-valued function template structures, see the SQL for RTQP Engine Reference Guide. You can also refer to the Query Compendium within PI SQL Commander Lite for examples of RTQP-specific syntax.
The following are some examples of basic SQL statements:
SELECT * FROM Master.Category.Category
SELECT Name
FROM Master.Element.ElementHierarchy
WHERE Path LIKE '\NuGreen\Houston\%'
SELECT Name, Description
FROM Master.Element.Element
WHERE Template = 'Boiler'