0
votes

I created a table with column : open_dt DATE FORMAT 'DD-MMM-YY' and am inserting records from a delimited txt file with records (28-Dec-94 , 1-Nov-80, 7-feb-06 ....etc). I get "Error executing query for record 2 : 2666: Invalid date supplied for open_dt".

Can someone help me with this. Thanks

1
Had you try 'D-MMM-YY'? 'DD' means day in two digit decimal number, so 'DD-MMM-YY' expects "01-Nov-80" instead of "1-Nov-80" - Fumu 7
Yes I tried changing it to D-MMM-YY but it gives me a invalid format string error - TD123
How about 'FMDD-MMM-YY'? - Fumu 7
Can you provide a sample of the SQL statement that is being used to import the data in SQL Assistant? - Rob Paller
I don't think you can ever use a one byte date like that, it needs to be two bytes. So 01-Nov-80. - Andrew

1 Answers

1
votes

Teradata doesn't support a single digit day.

You got luck, TD14 implements Oracle's TO_DATE which allows it:

to_date(input_string, 'dd-mon-yy')

But '28-Dec-94' might return '28-Dec-2094' instead of '28-Dec-1994'.