Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Thu, 27 Mar 2008 @ 16:06:55 GMT


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


Subj:   Re: Please give some idea about calendar operations
 
From:   Rob Paller

Depends on the grain of your data.

Is it captured at a daily level or aggregated to a monthly level with one record per month?

ADD_MONTHS(CURRENT_DATE, -6) will yield 2007-09-27. You will have to write your query carefully if you want to include all data that is included in the month of September. You may want to consider extracting the month from the date returned and then leveraging the system calendar table to get all days in that month.

A lot will depend on what the exact question is you are trying to answer and what data needs to be included to make sure you query is considering the correct range of time.


Hope this helps.



     
  <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: 28 Jun 2020