Valid time temporal table insert statement failed

Database
Teradata Employee

Valid time temporal table insert statement failed

HI All,

i am trying to create a validtime temporal table by below DDL statemnent where deptduration is derived column and when i inserting below mentioned record , its failed saying can not place null value in not null column.

 

Note : As per the teradata temporal docs( TD 15.00)the record is inserted where valid time column having values

 ('10/10/05', '99/12/31')  where 10/10/05 is temporal date 

 

DDL :

 

CREATE MULTISET TABLE department_vt1 ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO ( deptname VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC, deptno INTEGER NOT NULL, deptduration PERIOD(DATE) NOT NULL AS VALIDTIME) PRIMARY INDEX ( deptname ); 2b.)

Insert the following row.

 

DML :

INSERT department_vt1('Acct',805); 

 

can anyone help me on this why its not working for me . does it require any setting ?

 

Br,

Arun  parmar 

 

3 REPLIES
Enthusiast

Re: Valid time temporal table insert statement failed

I am new to teradata,  just tried with below statement.

 

INSERT into department_vt1
(deptname,deptno,deptduration) values
('Acct',805,period(date '2016-12-13',date '9999-12-31'));

Teradata Employee

Re: Valid time temporal table insert statement failed

i checked  the mentioned insert  statemnent already and it was working fine but its not my concern. 

i want to know the reason why its not working as per the teradata docs.

is that any setting need to be change or it wont work in TD 15.00 version ?

 

Teradata Employee

Re: Valid time temporal table insert statement failed

The NOT NULL attribute requires you to specify a value. If you omit NOT NULL or specify NOT NULL WITH DEFAULT (or even specify NULL), then the system default values will be supplied as you expected.