Parameters Statement [Interactive Sql] - Sybase Adaptive Server Anywhere Reference

Table of Contents

Advertisement

PARAMETERS statement [Interactive SQL]

Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility
Example
Use this statement to specify parameters to an Interactive SQL command
file.
PARAMETERS parameter1 , parameter2 , ...
None.
None.
"READ statement" on page 586
The PARAMETERS statement names the parameters for a command file, so
that they can be referenced later in the command file.
Parameters are referenced by putting:
{parameter1}
into the file where you wish the named parameter to be substituted. There
must be no spaces between the braces and the parameter name.
If a command file is invoked with less than the required number of
parameters, Interactive SQL prompts for values of the missing parameters.
SQL/92
Vendor extension
Not applicable.
Sybase
The following Interactive SQL command file takes two parameters.
PARAMETERS department_id, file;
SELECT emp_lname
FROM employee
WHERE dept_id = {department_id}
>#{file}.dat;
If you save this script in a file named
Interactive SQL using the following command:
READ test.sql [100] [data]
Chapter 9 SQL Statements
test.sql
, you can run it from
577

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Adaptive Server Anywhere and is the answer not in the manual?

Questions and answers

Table of Contents