|
-
Lets say wk = 2, then
to_date('01-JAN-&YYYY') + (&wk -1)*7 will give me the first day of the 2nd week following '01-JAN-&YYYY' .
Now from that date onwards, you have to test if it is a Monday and you have to test this for the 7 days in that week.
Since there is no loop functionality in sql, I used an inline view
( select rownum r from tab where rownum < 7 ) which is 1 through 6. But I had to subtract 1 because I dont want to miss the start date.
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
|