Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI SQL Commander Lite

Create a view

  • Last UpdatedFeb 10, 2023
  • 2 minute read
  1. Connect to PI AF Server using PI OLEDB Enterprise or Connect to PI Data Archive using PI OLEDB Provider and expand the schema under one of the data sources.

    Note: A view can only be created if PI SQL Commander Lite is connected to an OLEDB or an ODBC data source. For information about how to create a view for PI AF server using PI SQL Client, see Use the template-specific data model wizard.

  2. Right-click a Views folder and then select Create View.

  3. Enter an SQL statement in the query editor.

    Example query for PI AF server using PI OLEDB Enterprise or PI ODBC Driver:

    CREATE VIEW [NuGreen].[DataT].[New Test View]
    AS
    SELECT * FROM [NuGreen].[Asset].[Category]

    Example query for Data Archive using PI OLEDB Provider or PI ODBC Driver:

    CREATE VIEW [piarchive]..[New Test View]
    AS
    SELECT * FROM [piarchive]..[piavg]

  4. In the query editor, right-click and click Execute to execute the query.

  5. In the Object Explorer pane, right-click the Views folder and click Refresh to see the newly created view.

Related Links
TitleResults for “How to create a CRG?”Also Available in