Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Case for Index Organized table?
Take jaromir's approach of generating all seconds for a day and do a
minus operation from your measurement table having measurements for
each second except some ie. something like:
select /*+ cardinality (86400) */ trunc(sysdate) + (rownum-1) / (24 *
3600) as second
from dual connect by level <= 24*3600
minus
select date_column
from measurement_table
where trunc(sysdate) = trunc(date_column)
Ahhh ok and if you want between date_x and date_y then of course you have to correct dual approach to generate all seconds for necessary date interval and do minus taking the approproate data from measurement_table.
Gints Plivna
http://www.gplivna.eu
2007/4/24, Brady, Mark <Mark.Brady_at_constellation.com>:
>
>
> Example:
> I have an instrument that measures something (furnace temp, motor speed,
> etc) every second. Occasionally it fails to report the value. Find each
> second that it didn't report between date_x and date_y. What's the best
> way to answer that question?
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Apr 24 2007 - 03:49:49 CDT
![]() |
![]() |