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@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
On Behalf Of Ben Sauer
Sent: Thursday, September 23, 2004 5:15 PM
To: oracle-l@xxxxxxxxxxxxx
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
----------------------------------------------------------------------------
--
This message may contain confidential information, and is
intended only for the use of the individual(s) to whom it
is addressed.
----------------------------------------------------------------------------
--


--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l

Other related posts: