Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 18 Nov 2012 @ 21:16:11 GMT


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


Subj:   Re: Tpump and Date Format
 
From:   McCall, Glenn David

  My source file has dates coming in the format dd-mmm-yy (Ex 03-JUL-05). How should I format it to mm-dd-yyyy in a TPUMP script? Could anyone please give me the syntax for TPUMP?  


I am not sure if I understand your question correctly, so I will take a guess. The format clause specifies the format of the data in the incoming data stream (i.e. the file.). It doesn't specify the format of the data in the database. So for example if you declare a table with a column containing a date and the format of that column is mm-dd-yyyy, then when you extract data from that column (using bteq - not sql assistant or other ODBC/JDBC based tools) you will see it in mm-dd-yyyy format.

This does not affect the tpump script which must specify the format used to convert the incoming data to a DATE.

So I think the answer to your question is that if you have a file with dates in the form dd-mmm-yy then that is the format you use in the tpump script. The format of the target date does not matter.

Now if your question is that you wish to store this data in a varchar column and you want to re-arrange the charaters, then you must use string manipulation functions such as concatenate (||), substring and so on.

Perhaps you could clarify what you are trying to do with a bit more detail.


I hope this helps

Glenn Mc



     
  <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