Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 10 Feb 2003 @ 13:36:29 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   V2R5 Identity Column Population
 
From:   Claybourne Barrineau

Can someone help me figure out the following? I'm trying to get the new V2R5 Identity Column feature working.

Create table dice_clayt.identity_check
(
Org_Identity Integer generated always as Identity
 (Start with 1 Increment By 1 Maxvalue 1000000 No Cycle)
,Org_ID Integer Not Null
)
Unique Primary Index (Org_Id);

Insert into dice_clayt.identity_check
(
Org_ID
)
Select csum(1,1)
From  dbc.databases
Sample 20;

Error 7545: Numbering for Identity Column Indentity_Check.Org_Identity
is over its limit.

Try this again with a MaxValue of 1000000000:

Create table dice_clayt.identity_check
(
Org_Identity Integer generated always as Identity
 (Start with 1 Increment By 1 Maxvalue 1000000000 No Cycle)
,Org_ID Integer Not Null
)
Unique Primary Index (Org_Id);

Insert into dice_clayt.identity_check
(
Org_ID
)
Select csum(1,1)
From  dbc.databases
Sample 20;

Results:
Org_Identity Org_ID
1 263
100001 242
200001 353
300001 231
400001 147
500001 310
600001 79
700001 132
800001 282
900001 172
1000001 148
1100001 178
1200001 227
1300001 317
1400001 304
1500001 55
1600001 468
1700001 115
1800001 213
1900001 335

Why isn't the Optimizer 'Incrementing By' 1? In this case, it appears that the Optimizer is 'Incrementing By' 1,000,000; thus, we received an error earlier when our MaxValue was 1,000,000.


Thanks,

Clay



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023