![]() |
|
Archives of the TeradataForumMessage Posted: Sun, 28 Oct 2012 @ 19:11:36 GMT
Thank u Guyz. It is working when I ran it in SQL Assistance. But it wont work in MLOAD script if I use CAST('20121024 11:46:29' AS TIMESTAMP(0) FORMAT 'YYYYMMDDBhh:mi:ss'); Basically the '20121024 11:46:29' values I am receiving in extract file. When I am trying to insert into my Mlaod table which is having column award_date_time TIMESTAMP(0), it is throwing me an error ""6760 - Invalid timestamp My code :
.LAYOUT total_spent_layout;
.FIELD f_award_date_time * VARCHAR(19) ;
.DML LABEL Inserts;
INSERT INTO TTMMPPDDBB.TTMMPPEENNVV_total_spent_ml
(
journal_id
,as_of_date_time
,award_amt_ent
,award_date_time
)
VALUES
(
:f_journal_id
,null
,:f_award_amt_ent
,:f_award_date_time
);
.IMPORT INFILE TOTSPE01.dat
FORMAT VARTEXT '|'
DISPLAY ERRORS
NOSTOP
LAYOUT total_spent_layout
APPLY Inserts
;
If I make the table column datatype VARCHAR(20) then the date gets loaded without time. But I need the date with timstamp. Please advice. Thanks, Dipti Prakash
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||