LAST_DAY function in db2
Moderators: chulett, rschirm, roy
LAST_DAY function in db2
Hi All,
I have this field which needs to get the month end date of a given date field . i am populating a db2 table. I know db2 does have a function LAST_DAY which would give this result, i tried using this function on Advanced Query Tool , but i'm getting the following error
42884(-440)[IBM][CLI Driver][DB2/AIX64] SQL0440N No authorized routine named "LAST_DAY" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884
(0.19 secs)
Do not know as to why i'm getting this error.
any help in achieving this task would be of great help
Thanks in advance
I have this field which needs to get the month end date of a given date field . i am populating a db2 table. I know db2 does have a function LAST_DAY which would give this result, i tried using this function on Advanced Query Tool , but i'm getting the following error
42884(-440)[IBM][CLI Driver][DB2/AIX64] SQL0440N No authorized routine named "LAST_DAY" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884
(0.19 secs)
Do not know as to why i'm getting this error.
any help in achieving this task would be of great help
Thanks in advance
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Re: LAST_DAY function in db2
Appears issue with the arguments passed.sshettar wrote: No authorized routine named "LAST_DAY" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
probably this topic can give you a good start
viewtopic.php?p=338077&highlight=#338077
apart from that you need to add 1 to the month and if its 12 add 1 to year and hard code 01 as month.
viewtopic.php?p=338077&highlight=#338077
apart from that you need to add 1 to the month and if its 12 add 1 to year and hard code 01 as month.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.