Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 21 Jan 2013 @ 16:52:58 GMT


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


Subj:   Re: Data format issue
 
From:   Dieter Noeth

Koushik Chandra wrote:

  I am having data format issue. I have a table where the date column is defined as the format "yyyy/mm/dd" and when I am selecting from this table and doing substr it is giving correct result.  


I doubt there's a need to substring a DATE, it's usually more efficient to use EXTRACT, etc.

Could you show what you actually do?


  But I have complex transformation so in between I am inserting the data in a volatile temporary table where the data format is changing to "yy/mm/dd", though in the select I have specified the format as "yyyy/mm/dd". Because of this change of format all the sub-strings are working wrongly.  


Your system default is set to 'yy/mm/dd' (Integerdate) and the FORMAT is apparently not carried over to the Volatile Table.

Changing the dateform on session level should work:

     SET SESSION DATEFORM = ANSIDATE;

Dieter



     
  <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