Saving isql Input and Output

From InterBase
Jump to: navigation, search

Go Up to Using Batch Updates to Submit Multiple Statements


You can save the following to a file:

  • SQL statements entered in the SQL input area of the current session.
  • The output of the last SQL statement executed.

Saving SQL Input

To save the SQL statements entered in the SQL input area of the current session to a text file:

1. In the SQL Editor, choose Query>Save Script or click the Save Script toolbar button.
2. Enter a file name, including the location for the new file, in the Save As dialog and click Save.
To include the location for the file, type the file path and file name in the Filename text area, or browse to the folder where you would like the file to reside and type only the file name.

Only the SQL statements entered in the current session, not the output, are saved to the specified file.

Saving SQL Output

To save the results of the last executed SQL statement to a file:

1. In the SQL Editor, choose Query>Save Output.
2. Enter a file name, including the location for the new file, in the Export To dialog and click Save.
To include the location for the file, either type the file path and file name in the Filename text area, or browse to the folder where you would like the file to reside and type only the file name.

The output in the Data tab from the last successful statement is saved to the named text file.

If you run a SQL script, and then choose to save the output, all the commands in the script file and their results are saved to the output file. If command display has been turned off in a script with SET ECHO OFF, then SQL statements in the script are not saved to the file.