The problem is that he listed 2 requirements:

- Only SQL (ie no PL/SQL)
- No other tables

Personally, I always create a DateDimension_T table that holds a record for every day across several years. It is then very easy to turn a date range into the proper number of rows. However, my use of a secondary table is also precluded.

I'd be interesed in what you get back for this one. Short of hard-coding the proper number of unions, I don't think it can be done. The UNION solution would be something like joining your table against
SELECT 1 FROM DUAL UNION SELECT 2 FROM DUAL...
using the end_date minus the from_date to join, then adding the from_date back to the result to generate the target date. I'd explain it better, but it's a terrible solution anyway, as you are limited by the number of UNIONs you do. It becomes very hard to handle a multi-year range :)

(Watching to see if somebody finds something)

- Chris