Perform the following steps to prepare and execute a query.
-
Queries are limited to a maximum number of 5000 rows by default. (For more information, see )
-
The time taken to open an XL database (a database that contains up to 16000 structures and 4000 data sets) is relatively longer and proportional to the number of structures invoked. Any query that is executed before the connection is opened is ignored. Query Design Center notifies when the connection is opened by displaying text at the top of the Analyze Query window. For example, if the connection is not yet open, the message "Analyze Query" is displayed at the top of the window. When the connection is open, it displays the message "Analyze Query connected to <resource name>".
-
From the Resources window, right-click the desired resource and click Analyze Query.
The Analyze Query window appears.
-
In the text pane (top pane), type your query statement.
You can separate multiple query statements by using semicolons (;). To comment out a query, place two hyphens (--) at the start of the query statement. You can comment out selective text by surrounding it with /* and */.
-
Right-click and choose Prepare.
Query Design Center checks the syntax of your statement.
-
If the syntax is valid, the outcome along with item descriptions is displayed in the results pane (bottom pane). The following message also appears:
Statement was prepared successfully. See item descriptions above.
-
If the SQL syntax is not valid, an error message appears containing a description of the error. You must correct the syntax before proceeding.
-
-
Right-click and choose Execute.
If your SQL statement contains parameters, the Enter Parameters dialog box appears. Continue with step 5. Otherwise, Query Design Center executes the query and the outcome appears in the results pane.
-
Type the desired parameters in the parameter <n> boxes, and click OK.
The outcome of the query appears in the results pane.
Note: If the parameter type is Blob or Clob, a radio button is displayed enabling you to enter a URL. A Browse button is also available if you choose not to enter a URL. Use the Browse button to locate the file you want to enter. -
To save the results as a text file, right-click the results pane and click Save Result Set As.
The Save dialog box appears.
-
Navigate to the desired folder, type a name in the File name box, and click Save.
The file is saved.

