Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 24 Mar 2005 @ 14:58:57 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Statistics and collection date
From:   Geoffrey Rommel

     > SELECT ...
     > (SUBSTRING(StatsData FROM 2 FOR 1) ||
     > SUBSTRING(StatsData FROM 1 FOR 1) (BYTE(4))
     > ) - 1900
     > ) * 10000

You can avoid this complicated SQL by writing a UDF. A UDF can very easily take the first 7 bytes of the Statistics string and turn them into a timestamp (or a date, if that is sufficient for you). You will of course need V2R5.1 or later, a C compiler, and so on.

  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023