HP (Hewlett-Packard) c-tree-SQL ISQL and Tool reference Guide Printer User Manual


 
ISQL Statements
FairCom Corporation 3-39
Example
To record the displayed output into the file called STK, enter:
ISQL> SPOOL STK ON ;
ISQL> SELECT * FROM customer ;
ISQL> SPOOL OFF ;
3.7.21 START
Syntax
ST[ART] filename [ argument ] [ ... ] ;
Description
The START statement executes the first SQL statement stored in the specified script file.
Arguments
filename
The name of the script file. ISQL reads the file until it encounters a semicolon ( ; ) statement
terminator.
argument …
ISQL substitutes the value of argument for parameter references in the script. Parameter refer-
ences in a script are of the form &n, where n is an integer. ISQL replaces all occurrences of &1
in the script with the first argument value, all occurrences of &2 with the second argument
value, and so on. The value of argument must not contain spaces or other special characters.
Notes
In addition to executing the first statement in the script file, the START statement appends
the statement (after any argument substitution) to the history buffer.
The GET, START, and @ (execute) statements are similar in that they all read SQL script
files. Both GET and START read an SQL script file and append the first statement in it to
the history buffer. However, the START statement also executes the script statement and
accepts arguments that it substitutes for parameter references in the script statement. The @
(execute) statement, on the other hand, executes all the statements in an SQL script file but
does not add any of the statements to the history buffer. The @ statement does not support
argument substitution.
Example
ISQL> -- Nothing in history buffer:
ISQL> history
History queue is empty.