Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Temporal Intersection
cc wrote:
> Given a set of timelines, show the periods of intersection for those
> timelines. I'd like to be able to apply an overlaps operator, but Oracle
> 10R2 does not appear to implement one. I've also peeked at using SDO, but
> that seems unnecessarily complex. The Java Line2D class has an intersects
> method, but I'd prefer to implement in SQL, if possible.
>
> Note: If your email is formatting this message, it will make more sense in a
> monospace font like Courier New.
> E1, E2, E3, E4 - events
> B - begin
> E - end
>
> ..............................................................................................
> E1
> B--------------------------------------------------------------------------E
>
> E2 B------------------------E
>
> E3 B--------------------------------------E
>
> E4 B-------------------------------------------E
>
>
> Given a baseline event E1, I'd like to determine the period of intersection
> B(4) to E(2), since that time span
> contains information coincident to all events.
>
>
>
> A more complex case follows:
>
> ...............................................................................................
>
> E1 B----------------------E B-------------------------E
> B---------E
>
> E2 B----------------------------E
> B-------------E
>
> E3 B--------------------------------------E
> B----------------------------E
>
> E4 B--------------------E B-----------------E
> B---------------------------E
>
> In this case, I'd like to determine the following periods of overlap:
>
> B(3) through E(4)and B(2) through E(1)
You can write your own operator. For examples:
Morgan's Library at www.psoug.org
Scroll down to OPERATOR, USER DEFINED
For docs:
http://tahiti.oracle.com
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Feb 26 2007 - 19:16:54 CST
![]() |
![]() |