Archives of the TeradataForum
Message Posted: Mon, 01 May 2006 @ 14:14:14 GMT
<-- Anonymously Posted: Monday, May 01, 2006 10:12 -->
I am loading data from Teradata table on to flat files. While loading data I got problem in type casting Timestamp.
While defining table, two columns have been defined with same Timestamp data type and both are in same format. They look like this,
1. COL1TIMESTAMP TIMESTAMP(2) FORMAT 'YYYY-MM-DDBHH:MI:SS' NOT NULL, 2. COL2DATETIME TIMESTAMP(2) FORMAT 'YYYY-MM-DDBHH:MI:SS' NOT NULL
In Fexport script I type casted COL1TIMESTAMP as cast (COL1TIMESTAMP as varchar(20)) and The second column also same as well that is cast (COL2DATETIME as varchar(20)).
After writing I am checking select statement in SQLASSISTANT. When I am executing, it was throwing error Invalid timestamp.
There is no problem with data in COL1TIMESTAMP. I got a problem with COL2DATETIME.
I checked it by commenting second column it worked out well. If I am removing comment to second column then it was throwing error.
I think this may be due to data inconsistency in the table. Can any one suggest me how can I do type cast so that the data will be loaded into flat file.
Thanks & Regards
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|