| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: model inherited object
>> but can there be more than one null end date for a particular location? <<
For a location, yes. For temporal fact, no. Assume today is New Years Day:
Same locations, different temporal facts
>> in what-if modelling my 2007 change does not complete my 2005 location. <<
So?
>> I want a view of a location at a certain date, won't I have to do a massively complex select, maybe trying to analyze many "history" rows of the same location to see the correct values for all attributes? <<
Very easy. Create a Calendar table and use:
WHERE C.cal_date BETWEEN Events.start_date
AND COALESCE (Events.end_date,
C.cal_date)
AND COALESCE (Events.end_date,
CURRENT_TIMESTAMP)
The auxiliary Calendar table is very handy for other things, too.
Received on Thu Jun 22 2006 - 15:28:40 CDT
![]() |
![]() |