Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 25 Jan 2012 @ 20:16:37 GMT


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


Subj:   Re: Computing 3rd Saturday of the month
 
From:   Lunn, Jonathan

How about:

     SELECT CALENDAR_DATE
     FROM SYS_CALENDAR.CALENDAR
     WHERE CALENDAR_DATE BETWEEN DATE '2012-01-01' AND '2012-12-31'
     AND DAY_OF_WEEK = 1
     QUALIFY ROW_NUMBER() OVER (PARTITION BY MONTH_OF_YEAR  ORDER BY
     CALENDAR_DATE) = 3;

JL



     
  <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: 27 Dec 2016