Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Trigger problem...
Most likely you are comparing something against a null if which case the
result will come back false so the trigger will not fire. So it best to use
an nvl around field or make the field not null with a default value if that
is acceptable to your needs.
When (nvl(new.col1,' ')<> nvl(new.col2,' '))
-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]
On Behalf Of Ben Sauer
Sent: Thursday, September 23, 2004 5:15 PM
To: oracle-l_at_freelists.org
Subject: Trigger problem...
Probably pretty basic... but I've got a trigger that needs to execute when
the
new VarChar2 field <> the old VarChar2 field. In other words on Change.
But
it
seems that <> has strange results with them in the trigger. Am I supposed
to
use some alternate function like .equals() in Java. If so would somebody
mind
some syntax for me?
Thanks,
Ben
--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Sep 23 2004 - 18:28:59 CDT