Use the Properties page to specify the database, into which the query and the query text is to be placed.
Determine the following parameters on this page:
Select Database. In the drop-down list select a database, to which query is placed.
Query to Database. Create a query to database in the SQL language according to the syntax that is set for the selected DBMS driver.
The selected DBMS driver and the driver list are displayed next to the Query to Database field. By default, the driver list displays the selected driver used during repository connection setup. If query is specified for one or several drivers, the selected driver(s) will be marked in the driver list.
To show or hide the driver list, use the Hide Driver List/Show Driver List button.
Click the Check Query button to check if the created query is correct.
To set the specified query to database for all DBMS, click the Apply for All DBMS button. The confirmation dialog box opens. If query is specified for at least one driver that is different from the current one, all the specified queries will be replaced with the current one if the answer is positive.
Insert Parameter Values to Query on Execution. Select the checkbox to insert all parameter values to query on its execution. Values are inserted instead of parameter names of corresponding SQL literals specified on creating a query text. The checkbox is deselected by default, and only the parameter values that are arrays are inserted to the query and the other values are sent via parameters. The query execution time depends on the parameter data types in use and it can reduce if the checkbox is selected.
Allow Data Saving. If the checkbox is selected, the following group components can be edited:
Detect Table Automatically. When the radio button is selected, after clicking the Save button, the table to save data is automatically determined on the last page of the wizard. If the table is failed to be determined, the appropriate message appears:
Clicking the Yes button saves the query.
Clicking the No button cancels all the changes, the query creation wizard is closed.
Clicking the Cancel button closes the message.
Determine Table Manually. Set the table to save data in the edit box.
To finish the wizard, click the Save button, after which the query is saved. The following actions are executed on saving a query:
It refreshes the fields of objects which the query refers to.
It checks if the query text is correct. An appropriate message is displayed if there are any errors in the query text.
Determine the following parameters on this page:
Database. Select a database in the drop-down list, to which a query is placed. After selecting the database the driver used by it is automatically shown in the Driver list.
Driver. Select the driver type in the drop-down list. For details about available drivers see the Supported DBMS subsection. The Driver list displays by default the driver used in the selected database. If required, one can select another driver and determine the SQL query text for this driver. The parameter is relevant if the repository is used on servers with different DBMS, and settings in repository database are changed.
Query Text. Generate an SQL query in this box. A search and replace method is implemented in the SQL Query editor to make it more user-friendly. Changing the database automatically changes the driver, and the Query Text field displays a query corresponding to the selected driver.
Check Query. The button enables checking created query text. On clicking the button, the message about errors in query text is displayed.
Apply to All DBMS. This button enables the user to determine query text for all databases, that is, changing the driver does not affect query text. Clicking the button returns a request to confirm the operation. Answer Yes to set query text for all databases. Confirmation is required if at least one driver other than the current one, has non-empty query text.
Allow Data Saving. If the checkbox is selected, the following group components can be edited:
Detect Table Automatically. On selecting the radio button after clicking the Finish button, the table to save data is automatically determined in the last page of the wizard. If the table is failed to be determined, the appropriate message appears:
Clicking the Yes button saves the query.
Clicking the No button cancels all the changes, the query creation wizard is closed
Clicking the Cancel button closes the message.
Determine Table Manually. Set the table to save data in the edit box.
NOTE. To use subqueries in a query-based cube, select the Use Subqueries when Retrieving Data checkbox in the standard cube wizard.
Insert Parameters to Query on Execution. Select the checkbox to insert all parameters values to query body on its execution. Values are inserted instead of parameter names of corresponding SQL literals specified on creating a query text. The checkbox is deselected by default, and only the parameter values that are arrays are inserted to the query and the other values are sent via parameters. The query execution time depends on the parameters types in use and it can decrease with selected checkbox.
To finish wizard's work, click the Finish button, after which the query is saved. The following actions are executed on saving a query:
It refreshes the fields of objects which the query refers to.
It checks if the query text is correct. An appropriate message is displayed if there are any errors in the query text.
See also: