Archives of the TeradataForum
Message Posted: Fri, 04 Apr 2008 @ 10:53:19 GMT
One of my requirements is to have a fixed length identity generated for some display reasons (we don't expect this table to grow more than few hundreds in years, hence the approach)
CREATE SET TABLE TESTIDENTITY (ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1000 INCREMENT BY 1 MINVALUE 1000 MAXVALUE 9999 NO CYCLE), NAME VARCHAR(100) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, PATH VARCHAR(1000) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, USER_NAME VARCHAR(100) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, CREATE_DATE TIMESTAMP(0) NOT NULL,MODIFIED_DATE TIMESTAMP(0) NOT NULL, VERSION VARCHAR(100) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL, FILE BLOB(2097088000) NOT NULL,CHECK_SUM DECIMAL(18,0), ID_2_0 INTEGER ) UNIQUE PRIMARY INDEX ( ID );
I have few questions here (Couldn't find much docs/ manuals regarding the questions I have)
1. Does the PE assign the identity ranges to each of the amps based on the min max value used or it goes by the actual datatype limit /IDcolbatchsize.
2. Or does it check only at the time of insertion if the generated value exceeds the set limits, hence resulting in a failure.
3. Even tried changing DBS control IDcolbatchsize, but I guess this can't be a solution to me.
In my test cases , I've been able to insert the records to its limit but the same when done form Java/ JDBC there is a random failure saying "exceeded identity limit " even though there were hardly few records present in the table.
Have checked the INS statement generated from java / JDBC, looks like, INS project (all columns except identity) values (.....);
Any suggestions much appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|