|
-
Hi
First you need to generate all the days between given two dates
using a Subquery Factoring and then select only sundays from them
with all_days as
(select to_date('&from_date','mm/dd/yyyy')
+level
-1 all_sundays
from dual
connect by level<=to_date ('&to_date', 'mm/dd/yyyy')
- to_date ('&from_date', 'mm/dd/yyyy')
+ 1)
select all_sundays
from all_days
where to_char(all_sundays, 'DY') IN ('SUN')
Last edited by hrishy; 08-22-2007 at 06:30 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|