Subject | Re: OR in TRIGGERS |
---|---|
Author | Ryan Nilsson-Harding |
Post date | 2002-10-25T06:53:32Z |
Understood,
but my question remains,
Can you use 'OR', or some other kind of syntax which is equivalent
to an OR condition, in triggers?
i.e.,
IF (old.SOMEVAL <> new.SOMEVAL) OR
(old.SOMEOTHERVAL <> new.SOMEOTHER VAL) THEN
...
...
I'm getting an error 'Token Unknown - OR'
Rgds,
-Ryan
but my question remains,
Can you use 'OR', or some other kind of syntax which is equivalent
to an OR condition, in triggers?
i.e.,
IF (old.SOMEVAL <> new.SOMEVAL) OR
(old.SOMEOTHERVAL <> new.SOMEOTHER VAL) THEN
...
...
I'm getting an error 'Token Unknown - OR'
Rgds,
-Ryan
--- In ib-support@y..., Helen Borrie <helebor@t...> wrote:
> At 05:56 AM 25-10-02 +0000, you wrote:
> >Sorry,
> >this question is relevant to Triggers, not stored proc.
> >I'm sure it's the same, as they both use the same language though.
>
> Erm...they both use the procedural SQL (PSQL) subset; but
the 'new' and
> 'old' context variables are available only to triggers.
>
> There are other differences...for example, you can have input or
output
> parameters in triggers; you can't use EXIT in triggers...and one
or two
> others I can't think of right now.
>
> Also...you can't use the 'old' context variable in an insert
trigger; and
> you can't use the 'new' in a delete trigger.
>
> Hope this gives some clues...
>
> heLen