Archives of the TeradataForum
Message Posted: Wed, 24 Oct 2001 @ 17:12:40 GMT
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
|