Continuation for SQL Statements - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Product
Preprocessor2 for Embedded SQL
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities

Continuation for SQL Statements

Line continuation rules for a SQL statement within EXEC SQL blocks are the same as C continuation rules, with the following exceptions:

  • The EXEC SQL prefix, including the FOR clause, must be specified on one line.
  • Strings within a SQL statement in Teradata mode cannot be continued with the backslash character.
  • All characters, including blanks, from the beginning string delimiter to the ending string delimiter, form the string.

    If the ending string delimiter is not found on the current line, all characters up to the right margin are considered part of the string.

    On the next line, all characters beginning in the left margin and continuing to the ending string delimiter are part of the string.

    If no blanks are required, specify the string all the way to the right margin (column 72 or 80, depending on the MARGINS PP2 option), and immediately resume the left margin at (column 1) of the next line.

    Strings in ANSI compatible mode can be continued with the backslash character. The backslash is not included as part of the string.