Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 07 Dec 2005 @ 14:38:25 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Cast problem : invalid date format
 
From:   Michael Larkins

Arsalan:

You did not explain what you are trying to do when this error occurs. However, since Teradata will not store a zero date, it is obvious that the data is not already loaded. Therefore, I am guessing that you are trying to load bad data in what should be a date and is coming in as a character field. This will not work.

However, if you are using Fastload, Multiload or TPump, you can specify a NULLIF '00000000' on the field. That way a null will be loaded but the load will not blow up (which seems to be what you are experiencing.

Once you get this done and maybe already of coded this, but on your VALUES portion of the INSERT you will need to tell the utility about the format of the data coming into the load by coding the following:

     :in_char_date (date, format 'ddmmyyyy')

Of course the :in_char_date will be the name of the field that you define in your DEFINE or LAYOUT.


Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023