Contents Index OUTPUT statement [Interactive SQL] PASSTHROUGH statement [SQL Remote]

ASA SQL Reference
  SQL Statements

PARAMETERS statement [Interactive SQL]


Description 

Use this statement to specify parameters to an Interactive SQL command file.

Syntax 

PARAMETERS parameter1parameter2, ...

Usage 

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.

Permissions 

None.

Side effects 

None.

See also 

READ statement [Interactive SQL]

Standards and compatibility 
Example 

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 test.SQL, you can run it from Interactive SQL using the following command:

READ test.SQL [100] [data]

Contents Index OUTPUT statement [Interactive SQL] PASSTHROUGH statement [SQL Remote]