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 references 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
Example
ISQL> -- Nothing in history buffer:
ISQL> history
History queue is empty.
ISQL> -- Display a script file with the ! shell statement. The script's SQL ISQL> -- statement uses the LIKE predicate to retrieve customer names
ISQL> -- beginning with the string passed as an argument in a START statement:
ISQL> ! more start_ex.sql
SELECT customer_name FROM customers
WHERE customer_name LIKE '&1%';
ISQL> -- Use the START statement to execute the SQL statement in the script
ISQL> -- start_ex.sql. Supply the value 'Ship' as a substitution argument:
ISQL> START start_ex.sql Ship
CUSTOMER_NAME
-------------
Ship Shapers Inc.
1 record selected
ISQL> -- ISQL puts the script statement, after argument substitution,
ISQL> -- in the history buffer:
ISQL> history
1 ! more start_ex.sql
3 START start_ex.sql Ship
4 SELECT customer_name FROM customers
WHERE customer_name LIKE 'Ship%'