Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 27 Mar 2007 @ 20:13:01 GMT


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


Subj:   Error when loading NULL's in DATE field using
 
From:   Srikant Adem

Hello All,

I am pulling data from DB2 to Teradata using TPT.

TPT is doing Fastload.

I am getting an error when Column2 contains NULL Values with SourceCoulmn Data type as DATE. It is working fine when it doesn't encounter any Null Values.

     DB2 Source Structure: Column1 CHARACTER (10),
                                       Column2 INTDATE

Teradata Structure E.g.:

     CREATE SET TABLE ABC (
       Column3 VARCHAR (10),
                               Column4 DATE FORMAT 'YYYY-MM-DD' )
     PRIMARY INDEX (Column1);

Fastload does this Insert Statement:

     'INSERT INTO ABC (Column3, Column4) VALUES (:Column1, :Column2);'

Please advise the general process to load data in to Teradata using FastLoad when the Source Date Field contains NULL values.

Currently I made it to work using Coalesce (Column2,'defaultdate') but I need to go back and update them as null.

Another way that I am trying is to make Column4 as Column4 CHAR (10) in Teradata and when inserting, I am trying to transform Column2 to CHAR-- - VALUES (:Column1, :Column2 Char(10)). Could some one correct the Transformation.


Thanks in advance for your suggestions

Srikant



     
  <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: 27 Dec 2016