Create error table makes headache in Timestamp target datatype case

Database
Highlighted
Enthusiast

Create error table makes headache in Timestamp target datatype case

Hi,

I would like to make the error table work in Teradata. It works with integer, date

Does someone know how to make error table work with target datatype timestamp?
Is it a bug?

 

--This one works with target datatype INTEGER

 

CREATE SET TABLE table_old(i INT, j VARCHAR(10));
CREATE SET TABLE table_new(i INT, j INT);
CREATE ERROR TABLE FOR table_new; INSERT table_old (1,'nnn');

INSERT table_new SEL * FROM table_old LOGGING ALL ERRORS;

 

 

--This one doesn't work with target datatype TIMESTAMP(0)

 

CREATE SET TABLE table_oldTS(i INT, j VARCHAR(10));
CREATE SET TABLE table_newTS(i INT, j TIMESTAMP(0));
CREATE ERROR TABLE FOR table_newTS; INSERT table_oldTS(1,'nnn');

INSERT table_newTS SEL * FROM table_oldTS LOGGING ALL ERRORS;


-------------------------------------------------------

 

Workaround: Datatype check is possible with TRCAST function.

SELECT TRYCAST(VARCHARFIELD as TIMESTAMP(0)) 

-- MERGE INSERT doesn't allow logging option, or?