× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here is the midrange code link:

code.midrange.com/c0a1c9c4cb.html

Please note that I just typed this up to make it more generic than what my company actually used to load the table. So I apologize if there are any syntax errors.

Also, the value I chose to start the D_DATE_SK index column with is very specific.
Most DATE_DIM tables I found started with a value of 1.
I chose to start with a value of 693596. This was because the integer 693596 can be passed to the SQL DATE() function on the iSeries to generate the date '1900-01-01'.

This little change allows any of the index values to be passed directly into the DATE function to return the actual date, without needing to actually retrieve the original row from the database. I'm referring specifically to the First/Last of Month/Week columns, which all reference back to a D_DATE_SK key value.

Also, the SQL for the indexes was not included. Currently, we have created multiple indexes:

D_DATE_SK
D_DATE
D_YEAR,D_MOY,D_DOW,D_DATE
D_DATEYYMD,D_DATE
D_QOYN,D_DATE
D_MOYNA,D_DATE
D_MNYR,D_DATE
D_DATE_SK,D_DATE
D_QOYN,D_DATE

Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.