Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Oct 2001 @ 17:12:40 GMT


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


Subj:   Re: Select 1 day of the current month
 
From:   Thomas F. Stanek

I don't believe there is a built in function, but the system calendar could be used to easily provide the first day of the current month. Use the following:

Select calendar_date - (day_of_month+1)
  from sys_calendar.calendar
 where calendar_date eq date
;

FYI, The sys_calendar database is created through the execution of a Database Initialization Program (DIP) script. There is a utility that is used to run these scripts. If the database doesn't exist, you will need to do run the DIP script. It does not require a restart of the DBMS.


Regards,

Thomas F. Stanek
TFS Consulting



     
  <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