Output (SQL Wizard)

You can direct the data resulting from your SQL statement either to the Results tab or to a file.

The Output tab is available only when the type of the SQL statement is Select.

Display

Click Display to display the data resulting from your SQL statement on the Results tab.

  • Maximum number of rows to display Type the maximum number of rows of data that you want to be displayed on the Results tab. For example, if you type 50, then only the first 50 rows of data are displayed on the Results tab, even if more than 50 rows are returned in response to the SQL statement. The default value is 100. The maximum value is 1000. If you type a number greater than 1000, then only up to the first 1000 rows of data are displayed. Therefore, if your SQL statement results in more than 1000 rows of data, you may want to direct the data to a file.

File

Click File to write the data resulting from your SQL statement into a file.

  • File name Type the path and name of the file, or click Browse to browse for a file.
  • File type Click the file format that you want for the output file.
    • ASCII Text (*.txt) The data is ASCII text formatted in columns.
    • Comma separated values (*.csv) Also known as CSV format. The data is ASCII text, with each line containing one record, and the fields in each record separated by commas.
    • Microsoft Excel - BIFF3 (*.xls) Microsoft Excel 3.0 file format (BIFF3).
    • Microsoft Excel - BIFF4 (*.xls) Microsoft Excel 4.0 file format (BIFF4).
    • HTML (*.html) The data is formatted as an HTML table that can be displayed in an Internet browser.
      • Click Settings to configure the HTML settings.
    • XML (*.xml) (SQL Wizard) When the user selects XML as the type for the file that receives the output of an SQL Select statement, then the Z and I Emulator for Web client creates an XML file.

      Click Settings to select the type of XML file:

      DTD XML
      This type of XML file contains:
      • A Document Type Definition (DTD) with a document type of DatabaseOnDemand.
      • The data resulting from the SQL Select statement, formatted in accordance with the DatabaseOnDemand DTD.
      See The format of a DTD XML file.

      You can use Windows NotePad or any standard XML editor to edit the contents of the DTD XML file (to add, remove, or change data), so long as:

      • The changes are consistent with the DatabaseOnDemand DTD.
      • The DatabaseOnDemand DTD is not modified. (However, you can delete the DTD.)

      You can create the DTD-XML file with any of the following character encodings:

      Encodings available with Java 1 browsers: Encodings available with Java 2-enabled browsers:
      UTF-8 UTF-8
      Shift_JIS Shift_JIS
      GB2312 GB2312
      ksc_5601 EUC-KR
      Big5 Big5
      Excel XML
      This type of XML file can be opened and modified by Microsoft Excel 2003. See The format of an Excel XML file.
  • Overwrite file if file exists Click here to overwrite the data in an existing file. If the specified file does not exist it is created.
  • Append to file if file exists Click here to append the data to an existing file. If the specified file does not exist it is created.

When you finish the Output tab, click Next.

Related topics: