Convert a SQL Query to Query Builder Format - Intergraph Smart Instrumentation - Help

Intergraph Smart Instrumentation Help

Language
English
Product
Intergraph Smart Instrumentation
Search by Category
Help
Smart Instrumentation Version
13.1

When converting a SQL query to the Query Builder format the software converts the SQL to values that Query Builder works with. For example, the column header CMPNT_NUM in the SQL becomes Instrument Name in Query Builder, or the column header CABLE_NUM becomes the column header Cable Name in Query Builder.

There are two methods for converting a SQL query to the Query Builder format.

  • If you have already created and saved a SQL query to the SQL Editor folder, then do the following:

    1. In the Reference Explorer locate the query you want to convert in the SQL Editor folder.

    2. Right-click on the SQL query and select Actions > Convert to Query Builder, the Query Builder opens when the conversion is complete.

    3. Restore any broken relationships.

    4. Select Save.

  • If the SQL query you want to convert is open in the SQL Editor, do the following:

    • Select Actions > Convert Query, the Query Builder opens when the conversion is complete.

  • Relationships and methods are not assigned by the software during the conversion from SQL to the Query Builder format. After the conversion is complete, you must restore both the relationships and method using the Query Builder.

  • Conversion from SQL Editor to Query Builder files has its limitations. Not every SQL query can be converted or correctly deciphered. The following are examples of non-supported SQL syntax:

    • Non-explicit properties (wildcards) such as Select * from.

    • Sub-queries.

    • Union statements.

    • Computed fields.

    • Hidden Smart Instrumentation properties.

    • where not exists statements.

    • SQL Functions such as Insert/Update/Delete/Alter and so forth.

    • Input variables.

    • Semicolon ";" is not valid.