Using Embedded SQL - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
jiv1600056352873.ditamap
dita:ditavalPath
jiv1600056352873.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantageā„¢

The client application languages that support embedded SQL are all compiled languages. SQL is not defined for any of them. For this reason, you must precompile your embedded SQL code to translate the SQL into native code before you can compile the source using a native compiler.

The precompiler tool is called Preprocessor2 (PP2), and you use it to:
  • Read your application source code to look for the defined SQL code fragments.
  • Interpret the intent of the code after it isolates all the SQL code in the application and translates it into Call-Level Interface (CLI) calls.
  • Comment out all the SQL source.

The output of the precompiler is native language source code with CLI calls substituted for the SQL source. After the precompiler generates the output, you can process the converted source code with the native language compiler. For information about Call-Level Interface communications interface, see Client Communication with Teradata Database.