
Begin by opening the Query Builder Dialog box, which could be done in any of the following ways:
Contents |
If you have not previously connected to your datasource, you will need to set up a connection:
Once you have established a connection to your data source, you will see a list of objects to the right side of the Query Builder Dialog box.
With a data source connection, you can create a custom query using SQL scripts. Click the Show SQL button to open the query string dialog box. Then you can enter your own SQL script and click the Apply button. After this, you may see the changes in Column pane and Query Building Pane. If you are satisfied with the query, click the Import button to import data.
You can save a query to a workbook or an ODQ file by selecting either Query: Save to Active Sheet or Query: Save as ODQ File from the menu of the Query Builder dialog box. In addition, clicking the Import button in the Query Builder dialog box will cause the query to be saved in the target workbook.
Saving a query to workbook allows you to preview the data on the workbook and import the data at any time you want. The workbook can be saved as a template, which can also store information on the formatting of the workbook. Next time you open the template, you will have a formatted workbook with a customized query saved in it. Merely clicking the Import Data
button on the Database Access toolbar will fill the formatted workbook with data acquired from the data source.
ODQ files can be loaded by clicking the Load ODQ File button
on the Database Access toolbar or by selecting Query: Open from the Query Builder dialog box. After an ODQ file is loaded, you can apply the query saved in it to the active workbook. This is useful when you want to apply the query to many different workbooks.