Question

Locked

Remaining Months in the Year

By mchughl1 ·
Hi,

I am looking for dynamic SQL to return the current month and the months left in the year dependant on the current month. So if I ran it today I would want to return Sept through to Dec.
The results would look like this
9/1/2009
10/1/2009
11/1/2009
12/1/2009

Any help would be appreciated

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

SQL structure.

by john.a.wills In reply to Remaining Months in the Y ...

Select date
from whatever
where month_number (date) >= month_number (sysdate) and year (date) = year (sysdate);
That is the required SQL structure, you will need to look up the actual functions yourself.

Related Discussions

Related Forums