Subject | Re: [ib-support] OLD context variable behaviour on triggers |
---|---|
Author | Martijn Tonies |
Post date | 2002-12-05T12:30:25Z |
Hi Hugo,
Yes, this is normal.
To check for NULL use:
IF (OLD.column IS NULL)
With regards,
Martijn Tonies
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
Yes, this is normal.
To check for NULL use:
IF (OLD.column IS NULL)
With regards,
Martijn Tonies
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> Firebird 1.0 Win32not null, the trigger doesn't perform the THEN statement !!
> Let's suppose this table:
>
> CREATE TABLE PROVA(
> ID INTEGER NOT NULL PRIMARY KEY,
> ELMEUCAMP VARCHAR(8),
> HASCHANGED CHAR(1)
> );
>
> and this trigger:
>
> CREATE TRIGGER MyTriggerBU FOR PROVA
> BEFORE UPDATE AS
> BEGIN
>
> IF(OLD.ELMEUCAMP!=NEW.ELMEUCAMP) THEN
> NEW.HASCHANGED='X';
>
> END
>
> I'm find that, when I change ELMEUCAMP field value from NULL to something
> It's to say, if OLD.FIELD=null and NEW.FIELD='ABCD', they are equals forthe trigger.
>
> Is this normal? Maybe the problem is the VARCHAR type?
>
> Thanks in advance,
> Hugo.
>
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>