15.00 - 15.10 - Using Embedded SQL - Teradata Database

Teradata Database Introduction to Teradata

Product
Teradata Database
Release Number
15.00
15.10
Content Type
User Guide
Publication ID
B035-1091-151K
Language
English (United States)
Last Update
2018-09-25

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 Chapter 6: “Client Communication with Teradata Database.”