Exporting Data
You can export the contents of a table / result of a query in a number of ways:
In the first three of these cases, AQT will run the query against the database, and export the data as it is retrieved.
When exporting from Data Display, Export will not access the database, instead it will just export the data that is displayed in the grid.
If you wish to export a very large table, it is better to use one of the first three methods, as it avoids the overhead of displaying the data in the grid.
Running the Export
Once you have selected one of the above options, you will be shown the Export Options dialog. There are a number of options about the format of the export file - these are described in the remainder of this help topic.
Click on Export to continue with the export, or Cancel to cancel the export.
- while your query is running, you will be taken back to the window from which initiated the export. You will be given regular progress reports on the number of rows written to your file. If you wish to terminate the query, click on Abort.
Once your query has finished you will be asked whether you wish to view the file. If you do:
- for HTML export, you will be shown your exported data in your default web browser. For XML export, your default XML browser will be used (this may be Internet Explorer).
- for other export types, you will be shown a sample of your file using an AQT window. This may not show you your entire file. Note that if you have specified append, your data will be at the bottom of the file and may not be initially visible.
- you can copy data from the AQT window by selecting the data then hitting Ctrl+C. Alternatively, clicking on Copy All copies all the data.
- if you have written the data in fixed format you need to view the data using a non-proportional font (eg. one where all characters have the same width). Selecting Font > Non Proportional makes it much easier to view fixed-format data.
Export format
You can export your data in a number of formats.
- delimited file, such as a csv file (comma separated variables) or some other delimiter
- fixed format This is useful for loading into DB2 z/OS
- HTML. This publishes your data to a web page.
- Insert Statements. This exports your data as a number of insert statements. This is useful for transferring the data to another table, or having a simple backup of the table.
- Excel. This exports your data to an Excel Worksheet
- Grid. The Data will be exported as a Saved Grid. This can be later opened in AQT.
- XML. AQT will export the data in dbunit XMLDataset and FlatXMLDataset formats.
- JSON. AQT will export the data in JSON format.