Using C Structures as Input Host Variables - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide

Product
Teradata Preprocessor2
Release Number
17.00
Published
June 2020
Language
English (United States)
Last Update
2020-06-19
dita:mapPath
whb1544831946911.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2446
lifecycle
previous
Product Category
Teradata Tools and Utilities
  • Host structures insert data into the database. This feature is particularly useful for an INSERT statement with a VALUES clause that inserts multiple fields into a table using host variables.
  • A host structure as an entity is valid for input only if all fields of the structure are validly defined to PP2.

    All of the fields of the structure are passed to the database, therefore the application must ensure that the structure elements match the number and type of elements specified in the SQL statement.

  • Do not use a structure reference as an input entity in a WHERE clause or any place where a single field is expected.
  • Use individual fields of a structure for input as long as the fields are defined adhering to PP2 rules.
  • Qualified references to database objects in embedded SQL statements are expressed with a dot separating the levels of qualification.

See Host Variable Declaration.

The structure level can go deeper than the two levels shown, but the items, if individually referenced, must be uniquely identifiable with a qualification depth of no more than two.