EasyManua.ls Logo

Sybase Adaptive Server Anywhere - READ Statement [Interactive SQL]

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
READ statement [Interactive SQL]
586
READ statement [Interactive SQL]
Use this statement to read Interactive SQL statements from a file.
READ
filename
[
parameters
]
None.
None.
"PARAMETERS statement" on page 577
The READ statement reads a sequence of Interactive SQL statements from
the named file. This file can contain any valid Interactive SQL statement
including other READ statements. READ statements can be nested to any
depth. To find the command file, Interactive SQL will first search the current
directory, then the directories specified in the environment variable
SQLPATH, then the directories specified in the environment variable
PATH. If the named file has no file extension, Interactive SQL searches
each directory for the same file name with the extension
sql
.
Parameters can be listed after the name of the command file. These
parameters correspond to the parameters named on the PARAMETERS
statement at the beginning of the statement file (see "PARAMETERS
statement" on page 577). Interactive SQL substitutes the corresponding
parameter wherever the source file contains
{
parameter-name
}
where parameter-name is the name of the appropriate parameter.
The parameters passed to a command file can be identifiers, numbers, quoted
identifiers, or strings. When quotes are used around a parameter, the quotes
are put into the text during the substitution. Parameters which are not
identifiers, numbers, or strings (contain spaces or tabs) must be enclosed in
square brackets ([ ]). This allows for arbitrary textual substitution in the
command file.
If not enough parameters are passed to the command file, Interactive SQL
prompts for values for the missing parameters.
SQL/92 Vendor extension.
Sybase Not applicable.
The following are examples of the READ statement.
READ status.rpt ’160’
READ birthday.sql [>= ’1988-1-1’] [<= ’1988-1-30’]
Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility
Examples

Table of Contents

Related product manuals