Subject Re: [firebird-support] Checking periods don't overlap
Author Jerome Bouvattier
Hi,

> Any idea how to check periods don't overlap?? Ie in a table:
>
> create table T (entryid integer not null primary key, startdate
> timestamp not null, enddate timestamp not null);
>
> I could have a trigger like this:
>
> /* Before insert / update trigger */
> if (exists(select entryid from T where not(T.startdate > new.enddate
> or T.enddate < new.startdate) and T.entryid <> new.entryid)) then
> begin
> exception dates_overlap 'Your dates overlap';
> end
>
>
> But hey-ho, I can't dirty-read so it doesn't work properly!!!
>
> Come on guys, am I the only one who finds this a bit of a problem??

No, No. You're not. <g>

--
Jerome

[Non-text portions of this message have been removed]