Sep 19 2013

Using OLAP Functions to Extend Calendar Capabilities

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 10:08 am

I think it’s probably a safe bet to suggest that just about every data warehouse (or even transactional system) has some sort of calendar table. In many cases, the unique key for this table might be the natural key of the date itself, or perhaps it’s a system-generated surrogate key. That doesn’t really matter for this post. What I want to do is show one idea of how I used an OLAP aggregate function called row_number() to extend my calendar functionality, and make it really easy to schedule reports for the “last three months” given an input date. Continue reading “Using OLAP Functions to Extend Calendar Capabilities”


Sep 23 2008

Dynamic Dates Part V: More Databases

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 7:30 am

Some time back I posted a series of articles describing how to create “dynamic date” objects based off of the current system date. For examples I used the Oracle database. This post simply contains a collection of links that I have found to references for date/time functions for other databases. I hope it will be useful.

Related Links

External links are provided without endorsement and may become inactive at any time. These links were functioning properly at the time this blog post was published but dagira.com has no guarantee that they will continue to be available.


Sep 25 2007

Dynamic Dates Part IV: Yearly Date Ranges

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 4:18 pm

Last Time On This Subject…

This is the fourth in my series about dynamic date objects. The first three included objects for daily, weekly, and then monthly ranges. I am going to complete my collection of Oracle-based dynamic date objects by providing yearly objects in this post.
Continue reading “Dynamic Dates Part IV: Yearly Date Ranges”


Sep 12 2007

Dynamic Dates Part III: Monthly Date Ranges

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 2:57 pm

Last Time On This Subject…

In the first post in this series I introduced the idea of dynamic date objects. The intent was to show how a universe designer can create dynamic date objects that can be used to schedule reports with a condition that changes over time. The first post covered the basic concepts and included “Today” and “Yesterday” dynamic date objects. The next post covered weekly ranges. In this post I will further extend the concept to monthly ranges. As with the other posts so far in this series I will be using Oracle functions.

Continue reading “Dynamic Dates Part III: Monthly Date Ranges”


Aug 30 2007

Dynamic Dates Part II: Weekly Date Ranges

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 1:10 pm

Last Time On This Subject…

In the first post in this series I set up both regular objects and predefined condition objects that were based on the Oracle sysdate pseudo-column. These objects were designed to be used for scheduling reports with date conditions while allowing the date range to move forward in time for each new execution of the scheduled report. For that article I only created objects for Today and Yesterday. Today 😉 I will provide some weekly date ranges with the help of a few Oracle functions.

Continue reading “Dynamic Dates Part II: Weekly Date Ranges”


Aug 22 2007

Dynamic Dates Part I: Yesterday and Today

Categories: Dynamic Dates,Universe Design Dave Rathbun @ 11:05 am

Hitting a Moving Target

Does anybody really know what time it is?
Does anybody really care?
If so I can’t imagine why…

With apologies to the rock group Chicago, but I could not help starting out this post with a quote from one of their most famous hit records. Yeah, I have records. Deal with it. 😛

I am going to start out this post with a very obvious statement. There are two ways to get reports: Interactive and Scheduled. Interactive reports can have prompts that allow me to specify which values I want to see, and many times those prompts will include dates or date ranges. Since they are interactive I can change the dates each time I run the report.

But what about scheduled reports? I would hardly want to schedule a report that always ran for August 22, 2007, right? I want that date parameter value to change. Maybe I want the report to always run for “yesterday” or “last week” or “the second Tuesday of the month” or anything along those lines. The challenge is, of course, that the value for “yesterday” changes each day I run the report. How do I hit that moving target?

Continue reading “Dynamic Dates Part I: Yesterday and Today”