Identity Column Difference between Teradata & Data Stage

Database

Identity Column Difference between Teradata & Data Stage

hi to all and sorry for my english.

I have this table :
CREATE SET TABLE Table_example
(Key_Field INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY
(START WITH 1
INCREMENT BY 1
MINVALUE -2147483647
MAXVALUE 2147483647
NO CYCLE),
Simple _field INTEGER NOT NULL,
UNIQUE PRIMARY INDEX ( Key_Field );

if i insert rows in this table i have two different result if i use Teradata Sql Assistant or Data stage :

Teradata SQL Assistant :
------------------------
INSERT INTO Table_Example (Simple_Field) select (Other_table.Simple_Field)
From Other_table

The result is :
---------------------
Key_field Simple_Field
1 aa
2 bb
100001 cc
100002 dd
200001 ee
200002 ff

Data stage :
--------------
(using the same table)
The result is :
---------------------
Key_field Simple_Field
1 aa
2 bb
3 cc
4 dd
5 ee
6 ff

somebody know why ?

Thanks in advance

2 REPLIES
Teradata Employee

Re: Identity Column Difference between Teradata & Data Stage

Because DataStage is inserting individual rows (serially) but INSERT SELECT runs in parallel.

See "Process for Generating Identity Column Numbers" in the SQL Reference / Data Definition Statements under CREATE TABLE.

Re: Identity Column Difference between Teradata & Data Stage

Thanks.

I understand now.