Hi All,
I need to find out First day and last day of month based on prompt value in Derived table. Below is the query to find out First day and last day on DB2. On the below query, instead of Current date, i’ve to use Prompt date. Can anyone please help on this.
select (current_date - day(current_date) day +1 day) AS firstday,
(current_date +1 month -day(current_date) day) AS lastday from sysibm.sysdummy1
When I use below query on Derived table, it is giving error.
select (@prompt(‘Enter Date :’,‘D’,Mono,Free)) - day(@prompt(‘Enter Date :’,‘D’,Mono,Free)) AS firstday
from sysibm.sysdummy1
Thanks.
krithi (BOB member since 2005-01-07)