Too, too sweet!!!

I can't believe I missed that. That is sooo cool!!!

You replaced my hokey UNIONed list with a readily-available one - very nice!

Of course, just to do my usual Devil's advocate bit, there *are* some minor issues with such an approach.

- The Oracle 'views' are generally terrible performance-wise. Using them in regular SQL is a chancy thing at best. Again, I love this solution - just trying to show the problems as well.

- You can't do an EXPLAIN PLAN on a query that uses an Oracle view unless you have major rights, which most people do not. This makes it even riskier to include these views in complicated or time-intensive SQL.

- The meaning of what you are doing is a little hidden. Having an actual DateDimension table makes the functionality obvious, and optimizable, with everything being completely under your control.

However, given the incredible restrictions of this particular post, jmodic turned in an outstanding answer!

</me tips hat>

- Chris