Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 13 Sep 2006 @ 16:07:59 GMT


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


Subj:   Re: How to FORMAT date
 
From:   Michael Larkins

Emanuel:

You really haven't given us much to work on here. Is this form for data going out of Teradata via a SELECT or is it coming into Teradata via an INSERT?

For SELECT using BTEQ, FASTEXPORT, Intrigate, or Nexus:

     SELECT your_date (format 'yyyymmdd'), ...

For SQL Asst:

     SELECT your_date (format 'yyyymmdd')(CHAR(8)), ...

If instead, you are looking to do this on the input side -

BTEQ:

     USING indate (CHAR(8)), ...

FASTLOAD:

     DEFINE  indate (CHAR(8)), ...

MLOAD:

     ..LAYOUT  mydata;
     ..FIELD  indate  *  CHAR(8);

All three:

     INSERT into date_table VALUES (:indate (date, format 'yyyymmdd'), ...

This should cover most any situation you are looking to address. In future postings, the more detail you provide, the better your answer will be overall.


Regards,

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