while compiling a stored procedure getting error column 'xxx' is not nulll, give column a value

Database
Enthusiast

while compiling a stored procedure getting error column 'xxx' is not nulll, give column a value

there is insert statement in the stored procedure as below, and DDL for the table is pasted below. Error is due to clumn 'INSTIME TIMESTAMP' which is not null and not mentioned in insert statement, but my qsn is how this field is being populated if it not done through this insert statement. This is oracle sp migration into Teradata. Same code is working in Oracle. 

Is there any other SP or something that populates this field beforehand and i am missing something related to this SP? 

INSERT INTO base_tbl.h_toplineexport (report, partnerid, eventdate, value_TD)                                                      
SELECT '15) Number of Images Uploaded', partnerid, upload date,
count(*)
FROM base_tbl.h_newsource
WHERE isCopy = 'N'
and state = 'A'
and nodetype = 'I'm
GROUP BY uploaddate, partnerid;

DDL for the table 

CREATE MULTISET TABLE base_tbl.H_TOPLINEEXPORT ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT,
DEFAULT MERGEBLOCKRATIO
(
REPORT VARCHAR(350) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
PARTNERID VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
EVENTDATE TIMESTAMP(0) NOT NULL,
VALUE_TD DECIMAL(15,3),
INSTIME TIMESTAMP(0) NOT NULL)
NO PRIMARY INDEX ;

1 REPLY
Senior Apprentice

Re: while compiling a stored procedure getting error column 'xxx' is not nulll, give column a value

There was propably a default assigned to that column in Oracle, so simply do the same:

INSTIME TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)

If you can't alter the table you must add INSTIME to the INSERT.