15.10 - Using Structures and Arrays to Insert - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

To declare one structure to hold all the variables, use the following syntax:

EXEC SQL INSERT INTO <table name> VALUES (…) RETURNING :hoststructure1

For the array insert feature using a cursor, use the following syntax:

EXEC SQL
	DECLARE CURSORNAME CURSOR FOR
	INSERT INTO TABLENAME VALUES (:col1,:col2);
EXEC SQL FOR N
	OPEN CURSORNAME;