db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Menzel" <anig...@hotmail.com>
Subject OVERLAPS predicate, datetime artithmetic
Date Sun, 04 Mar 2007 18:34:01 GMT
Hi all,


The Derby documentation says about the OVERLAPS predicate that it "can be
done with Java methods".


Could someone please give an example on how to do this? I need to find out
if a timeframe that is calculated in my application (start and end datetimes
known as Java Date objects) overlaps with any timeframes stored in the db.
My table has the fields start_datetime (type TIMESTAMP) and
duration_in_milliseconds (type BIGINT). There is no "end_time" field as
such. Duration can be NULL in the db, then it shall be assumed the duration
is one hour.


How can I write this query?


Any help greatly appreciated, thanks.



View raw message