Contents Index Running SQL command files Executing command files

ASA SQL User's Guide
  Importing and Exporting Data
    Running SQL command files

Writing output to a file


In Interactive SQL, the data for each command remains on the Results tab in the Results pane only until the next command is executed. To keep a record of your data, you can save the output of each statement to a separate file. If statement1 and statement2 are two SELECT statements, then you can output them to file1 and file2, respectively, as follows:

Statement1; OUTPUT TO
      file1;
      statement2; OUTPUT TO
      file2;

For example, the following command saves the result of a query:

SELECT * FROM EMPLOYEE;
OUTPUT TO "C:\\My Documents\\Employees.txt"

For more information, see OUTPUT statement [Interactive SQL].


Contents Index Running SQL command files Executing command files