Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Trigger problem...

RE: Trigger problem...

From: Ken Naim <ken_at_clubmom.com>
Date: Thu, 23 Sep 2004 18:16:24 -0400
Message-ID: <EA052B73AC607549BCB8BFEF4747DA213A@cmiechange>


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



--

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 Received on Thu Sep 23 2004 - 18:28:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US