6. Embedded SQL for BASIC : Embedded SQL Statement Syntax for BASIC : Line Continuation
 
Share this page                  
Line Continuation
Embedded SQL statements and variable declarations can be continued over multiple lines. The line continuation rules are the same as those for BASIC statements. The ampersand (&) character followed immediately by a newline character indicates to the preprocessor that the current statement or declaration is to be continued. For example, the following select statement is continued over four lines:
exec sql select ename        &
        into :namevar        &
        from employee        &
        where eno = :numvar
Blank lines can be included between Embedded SQL statement lines and do not require a continuation indicator. If a line continuation character is missing from the end of a line containing an Embedded SQL statement to be continued, the preprocessor generates the error message:
"Syntax error on terminator or missing BASIC continuation indicator."
The preprocessor does not enforce strict line continuation rules in declaration sections.