INCLUDE | Teradata Vantage - INCLUDE - Teradata Vantage - Analytics Database

SQL Stored Procedures and Embedded SQL

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
frc1628111662093.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
rjx1472253414573
lifecycle
latest
Product Category
Teradata Vantage™

Incorporates an external source file into the application program.

ANSI Compliance

INCLUDE is ANSI/ISO SQL:2011-compliant.

Required Privileges

None.

Invocation

Nonexecutable preprocessor declaration.

Embedded SQL only.

Syntax

INCLUDE include_file_name

Syntax Elements

include_file_name
The name of the source file to be included.
If text_name is SQLCA or SQLDA, a special case results: INCLUDE SQLCA and INCLUDE SQLDA are not instances of INCLUDE and are defined separately.

Usage Notes

  • Preprocessor2 searches the directory path for a file having the specified name and a language specific file extension:
    For this language … Preprocessor2 searches for this INCLUDE file type …
    C pc
    COBOL pb
    PL/I pi
  • The length of the INCLUDE filename can be up to 30 bytes.
  • The INCLUDE statement is effectively replaced by the included text in the application program input to Preprocessor2.
  • INCLUDE statements cannot be nested.

    Included text can contain any embedded SQL statements except another INCLUDE.

  • You can specify INCLUDE SQLCA and INCLUDE SQLDA statements in the included text.

Related Information

INCLUDE SQLCA and INCLUDE SQLDA.