Accessing the PI SQL Query Compendiums and Sample Queries

Document created by kduffy on Oct 5, 2018Last modified by kduffy on Jul 2, 2019
Version 5Show Document
  • View in full screen mode

One of the most helpful tools for building queries against the different PI SQL query engines (RTQP, PI OLEDB Provider, PI OLEDB Enterprise) is the collection of sample queries.

 

Within PI SQL Commander, the Query Compendium provides a few sample sql files with numerous queries organized by topic, as well as sample queries for each table. The documentation contains the query compendium for the PI OLEDB Provider and PI OLEDB Enterprise as well.

 

PI SQL Commander - Query Compendium

  1. In PI SQL Commander, click on the "Query Compendium" button along the top toolbar
  2. Navigate through the folders to access the different .sql sample files. Double click on the one of interest.
  3. Read through the file in the query window and highlight the query you would like to execute
  4. Click the "Execute" button to run this specific example query

 

Note: PI OLEDB Provider and PI OLEDB Enterprise each have a single set of query files, but RTQP has two:

  • The first set is in the "Migration" folder and are intended to mimic the PI OLEDB Enterprise query compendium layout, converting the PI OLEDB Enterprise queries to equivalent RTQP queries.
  • The second set is in the "Queries" folder and is intended to be a standalone query compendium guiding you through the RTQP Engine without the context of PI OLEDB Enterprise.

 

PI SQL Commander - Predefined Queries:

Each table in PI SQL Commander has a predefined query that can be executed against it to demonstrate usage and syntax.

  1. Navigate to the table of interest in the Object Explorer
  2. Right click on the table and select "Execute Predefined Query..."

 

Documentation

Attachments

    Outcomes