Subject | Re: [ib-support] Re: BUG IN FIREBIRD |
---|---|
Author | Ann W. Harrison |
Post date | 2001-10-16T16:33:36Z |
banzatto@... wrote:
boolean expression evaluates to false. To make this work, you'll
need to add code to handle the null case.
NULL)
NULL)
NULL)
NULL)))
Ann
www.ibphoenix.com
We have answers.
Please, next time, don't shout bug until you're more certain you've got a bug.
It upset me.
>CREATE TRIGGER AREA_BI0 FOR AREAIf one of those fields has a null value in either table, then your
>...
> > > WHERE (A.DIVISAO1 = NEW.DIVISAO1)
> > > AND (A.DIVISAO2 = NEW.DIVISAO2)
> > > AND (A.DIVISAO3 = NEW.DIVISAO3)
> > > AND (A.DIVISAO4 = NEW.DIVISAO4)))
> > > THEN
> > > EXCEPTION CHAVE_DUPLICADA;
>
>The fields DIVISAO1, DIVISAO2, DIVISAO3, DIVISAO4 cannot have to be
>duplicate, but they can have null values , therefore the use of
>trigger. Only that to trigger she does not function. Why ?
boolean expression evaluates to false. To make this work, you'll
need to add code to handle the null case.
>CREATE TRIGGER AREA_BI0 FOR AREAOR A.DIVISAO1 IS NULL AND NEW.DIVISAO1 IS
>...
> > > WHERE (A.DIVISAO1 = NEW.DIVISAO1
NULL)
> > > AND (A.DIVISAO2 = NEW.DIVISAO2OR A.DIVISAO2 IS NULL AND NEW.DIVISAO2 IS
NULL)
> > > AND (A.DIVISAO3 = NEW.DIVISAO3OR A.DIVISAO3 IS NULL AND NEW.DIVISAO3 IS
NULL)
> > > AND (A.DIVISAO4 = NEW.DIVISAO4OR A.DIVISAO4 IS NULL AND NEW.DIVISAO4 IS
NULL)))
> > > THENRegards,
> > > EXCEPTION CHAVE_DUPLICADA;
Ann
www.ibphoenix.com
We have answers.
Please, next time, don't shout bug until you're more certain you've got a bug.
It upset me.