| United States-English |
|
|
|
![]() |
ALLBASE/SQL Pascal Application Programming Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Embedding SQL CommandsGeneral Rules for Embedding SQL |
|
Embedded SQL commands must appear in certain locations within the Pascal program. Each embedded SQL command must be accompanied by a prefix and followed by a semicolon. Comments may be placed within an embedded command, and non-numeric literals in embedded commands may be continued from one line to another. An embedded SQL command has no maximum length. A dynamic SQL command can be no longer than 2048 bytes as a literal string, but the maximum size of the host variable is 32,762. SQL commands must be put into the following specific areas: Precede each SQL command with the prefix EXEC SQL and terminate each SQL command with a semicolon (;). The entire prefix, EXEC SQL, must be specified on one line. For example, the following examples are legal:
However, the following is not legal:
You may insert Pascal comment lines within or between embedded SQL commands. A comment begins with { and closes with } or begins with (* and closes with *), as follows:
SQL comments can be inserted in any line of an SQL statement, except the last line, by prefixing the comment character with at least one space followed by two hyphens followed by one space:
The comment terminates at the end of the current line. (The decimal point in the 500 improves performance when being compared to SalesPrice, which also has a decimal; no data type conversion is necessary.) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||