Subject | Re: [firebird-support] Re: Checking periods don't overlap |
---|---|
Author | Jerome Bouvattier |
Post date | 2004-06-16T13:47:42Z |
> > If you run this in a Read Committed transaction (default behaviour)2000
> > it would stop and freeze when it came to an uncommitted record. It
> > would either timeout (if you set the system up that way), or when
> > rollback / commit occured in the other transaction it would proceed
> > (with or without the conflicting value).
>
> That's what I thought too. I was wrong ! I just verified this on my SQL
> server.!
> Once I commited tx #1, tx#2 committed as well nicely breaking your trigger
>Digging further in MS SQL help ...
> Interesting. No ?
CHECK constraints appear useless in our case since they seem to be record
level only.
Let's see what triggers can do...
In the CREATE TRIGGER section, there is a sample clearly stating that since
CHECKs can't be used for multi-records or multi-tables constraints, triggers
can be used to implement such business rules.
The example, shows to ensure an inserted/updated employee sees its ability
level meet the range defined in the job table.
I broke this one as well...
--
Jerome