Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

INTO

FROM

More Information

statement name

RDB/VMS SQL PREPARE — VMS SQLdev_2.0

 PREPARE statement-name --+--------------------------------------+-+
                          +-> SELECT LIST INTO descriptor-name --+ |
     +-------------------------------------------------------------+
     +-> FROM --+-> statement-string -+-> ;
                +-> parameter --------+

Additional information available:

INTOFROM

More Informationstatement name

More Information

 The PREPARE statement checks an SQL statement dynamically
 generated by a program for errors and assigns a name to that
 statement.  With the optional INTO clause, the PREPARE statement
 also writes information about any output parameters in a
 prepared SELECT statement to the SQLDA.

 PREPARE is a dynamic SQL statement and can be used only in
 precompiled programs or as part of SQL module language
 procedures.  It cannot be used in interactive SQL.

statement name

 The name you want to assign to the prepared version of the SQL
 statement specified in the FROM clause.  Depending on the type
 of SQL statement prepared, DESCRIBE, EXECUTE, and DECLARE CURSOR
 statements can refer to the statement name assigned in a PREPARE
 statement.

INTO

 Specifies that SQL writes information about the number and data
 type of output parameters in the statement string to the SQLDA.
 The SELECT LIST keyword clarifies the effect of the INTO clause
 and is entirely optional.  Using the SELECT LIST INTO clause in
 a PREPARE statement is an alternative to issuing a separate
 DESCRIBE...SELECT LIST statement.

 The descriptor name specifies a structure declared in the host
 language program as an SQLDA to which SQL writes output
 parameter information.  If the program uses the embedded SQL
 statement INCLUDE SQLDA, the name of the structure is simply
 SQLDA.  Programs can use multiple SQLDAs but must explicitly
 declare them with names other than SQLDA.

FROM

 Specifies the SQL statement to be prepared for dynamic
 execution.  You either specify the statement string directly in
 a quoted character string literal or in a parameter that
 contains the statement string.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026