Program Output - Teradata Preprocessor2

Teradata® Preprocessor2 for Embedded SQL Programmer Guide - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Preprocessor2
Release Number
20.00
Published
October 2023
ft:locale
en-US
ft:lastEdition
2023-11-20
dita:mapPath
nyr1691484085721.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
xfi1470440464166
Product Category
Teradata Tools and Utilities

After the following setup SQL is executed:

CREATE TABLE upstb, FALLBACK
  (item      integer,
   itemCount integer)
PRIMARY INDEX (item);
insert into upstb(1,1);
insert into upstb(2,1);
insert into upstb(3,1);
insert into upstb(4,1);

the sample program output is:

EXECUTING "upsert" SQL:
update upstb set itemcount=11 where item=11 else
insert into upstb(11,11)...
BEFORE UPSERT: 4 ROWS SELECTED
UPSTB row   : 2  | 1
UPSTB row   : 3  | 1
UPSTB row   : 4  | 1
UPSTB row   : 1  | 1
AFTER UPSERT: 5 ROWS SELECTED
UPSTB row   : 2  | 1
UPSTB row   : 3  | 1
UPSTB row   : 4  | 1
UPSTB row   : 11  | 11
UPSTB row   : 1  | 1