Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Jul 2007 @ 08:29:21 GMT


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


Subj:   Re: varhar(8) to date
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, July 12, 2007 22:11 -->

Are you saying the VARCHAR field is in yy/mm/dd format?

You need to CAST properly but may need some processing to set century correctly first e.g.

     insert into edw_work.vips1(doj)
     select
      case
      when substring(doj from 1 for 2) > '10' /* date range 1911-2010 */
       then cast('19'||doj as date format 'yyyy/mm/dd')
      else cast('20'||doj as date format 'yyyy/mm/dd')
      end
     from edw_work.vips;


     
  <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