Previous Topic Next topic Print topic


DUMP

Restriction: This topic applies to Windows environments only.

This batch SQL command outputs the query result to a file

The syntax is:

DUMP file_name;

The file name specified by this command is the destination of the output of the query result. If the same file name is used in multiple DUMP commands, each query result set is appended to the one that precedes it in that file.

The DUMP command must be placed immediately after each query statement on which you want it to take effect.

For example:

SELECT * FROM customer 
WHERE state="CA"
DUMP ResultSet1.out;  --Write result set to a file named ResultSet1.out

SELECT * FROM customer 
WHERE state="MD"
DUMP ResultSet1.out;  --Append result set to ResultSet1.out

SELECT * FROM customer 
WHERE state="NY"
DUMP ResultSet2.out;  --Write result set to a file named ResultSet2.out

The DUMP command is only effective when the batch script is run from the development environment's command prompt; it has no effect if the batch script is run from SQLWizard.

Previous Topic Next topic Print topic