Contents IndexOUTPUT statement PASSTHROUGH statement

User's Guide
   Part VI. SQL Anywhere Reference
     Chapter 43. Watcom-SQL Statements
      PARAMETERS statement

Function

To specify parameters to an ISQL command file.

Syntax

     PARAMETERS parameter1, parameter2, ...

Usage

ISQL.

Permissions

None.

Side effects

None.

See also

Description

The PARAMETERS statement specifies how many parameters there are to a command file and also gives names to those parameters 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 fewer than the required number of parameters, ISQL prompts for values of the missing parameters.

See "Command Files".

Example

The following ISQL command file takes two parameters.

     PARAMETERS department_id, file ;
     SELECT emp_lname
     FROM employee
     WHERE dept_id = {department_id}
     >#{file}.dat;

Contents IndexOUTPUT statement PASSTHROUGH statement