Performing a Query
Specifying the Sample Query Using the Dialog Box
After you specified the Query in the Query Wizard and completed your entries by clicking Finish, the New Query Properties dialog box is opened. You can use this dialog box to specify the query further. You can also use this dialog box to edit an existing query later. In this case, the dialog box is named Properties of Query "xyz." To open the dialog box, select the query, and then select Properties on the context or File menu.
The dialog box provides the four tab pages:
General tab page: Enter or edit the query title in the Title field. From the Datasource drop-down list, select the datasource for which the query is performed. If this field remains empty (default), the query is performed for the datasource in which the query is saved. The Preferred RDF File and Preferred Channel settings are used when a sample is opened or a batch report is started.
Native SQL tab page: This tab page is read-only by default, providing information about the SQL statement sent to the ODBC driver. (Please note that the SQL statement is translated into the SQL syntax of the corresponding ODBC driver.) To edit the SQL statement manually, select the Always use native SQL check box.
Caution:
This edited SQL statement is used whenever the query is performed, as long as the Always use native SQL check box remains selected.
SQL tab page: Use this tab page to edit the SQL condition(s) that the samples must fulfill. To open the Edit Condition dialog box, click Edit > Insert. Or else, place the mouse pointer in the list field and double-click the left mouse button or select Edit Condition on the context menu. Use this dialog box to add SQL conditions (select Restrict Condition (AND) or Expand Condition (OR)) or to change the existing condition (select Change Condition).
Result Restrictions tab page: Use this tab page to specify the query further. You can change, restrict, or expand the query. Open the Edit Condition dialog box by clicking Edit/Insert and select Change Condition, Restrict Condition (AND) or Expand Condition (OR).
Enter a report variable in the Formula field. Click the '...' button to open the Edit Result Formula dialog box and select a formula. (For more information about the report variables and their categories, refer to Report Categories). Enter an operator. (For information about which SQL operators are supported, refer to Selecting Search Criteria for Samples and/or Sequences.) Finally, type a reference value in the Value field.
Tip:
It is not possible to access User-defined Columns by clicking the '...' button. Enter the formula for the user-defined column directly in the Formula field:
For user-defined columns from the sample list of the Browser, enter:
smp.x
where x is the name of the user-defined column.
For user-defined columns from the peak table of the QNT Editor, enter:
peak_tab.user_x
where x is the name of the user-defined column.
After you have made the necessary entries, click Apply to start the search.
For examples of how to enter the query using the dialog box, refer to Examples (Dialog Box).