×
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.
and create a related table
MYFILE2
KEYFIELD
DateFieldForReal
OtherNewFieldsAsNeeded
...
But it wasn't. It was more of a load a new, unrelated table for use by
all tables using unreal dates. This new table may have columns like
RealDate
DateNbrCCYYMMDD
DateNbrMMDDCCYY
DateNbrJulian
DateNbr...
DateChar...
Then you preload the above table with all dates from 01-01-0001 through
maybe two hundred years into the future.
Then you would do a
Select KEYFIELD, DATAFIELD1, RealDate, DayOfWeek(RealDate)
From MYFILE left outer join DateTable on DateFieldNbrmmddccyy =
DateNbrMMDDCCYY
Of course, you could also have DayOfWeek in that table and avoid that
calculation also. Then there's month, etc. And if your shop has unique
stuff like fiscal period and whatnot you can cover that also.
And the pundits are saying that joining to the additional table may out
perform doing the calculations on the fly. Very interesting!
values days(date('2400-12-31'))
returns 876,582. So that's how many rows you might put into your table.
And probably all columns would have their own index
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
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.