**************************************************************************************
SQL> var p_month char(2)
SQL> exec :p_month := '02'
SQL> var p_year number
SQL> exec :p_year := 2001;
select dates
from (select to_date(:p_month||substr('0'||rownum,-2)||:p_year,'mmddyyyy')dates
from all_objects
where rownum <= to_char(last_day(to_date(:p_month||:p_year,'mmyyyy')),'dd'))
/
DATES
---------
01-FEB-01
02-FEB-01
03-FEB-01
04-FEB-01
05-FEB-01
06-FEB-01
07-FEB-01
08-FEB-01
09-FEB-01
10-FEB-01
11-FEB-01
12-FEB-01
13-FEB-01
14-FEB-01
15-FEB-01
16-FEB-01
17-FEB-01
18-FEB-01
19-FEB-01
20-FEB-01
21-FEB-01
22-FEB-01
23-FEB-01
24-FEB-01
25-FEB-01
26-FEB-01
27-FEB-01
28-FEB-01