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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL: To determine which field was update

Re: PL/SQL: To determine which field was update

From: Duncan MacGregor <aa735_at_FreeNet.Carleton.CA>
Date: 1997/08/20
Message-ID: <5tdndm$6oc@freenet-news.carleton.ca>#1/1

Recently, Chris Hamilton (Christopher.H.Hamilton_at_usace.army.mil) wrote:
>
> You may wish to use the nvl() function to make sure nulls are compared
> properly (since null doesn't equal anything, but it doesn't not equal
> anything either).
>
> For instance,
>

 [munch]
>
> For date:
>
> if nvl(:old.field1,'01-jan-01') != nvl(:new.field2,'01-jan-01') then
> blah-blah;
> end if;

What happens when either field happens to have the date equal to "1st January, 2001"? Is that equivalent to '01-jan-01', or a different value, or what?

If it *is* equivalent, "NULL" will acquire a whole new meaning ... :-)
>
> Chris
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just another example of the Y2K problem ...

--
Duncan MacGregor | aa735_at_freenet.carleton.ca  | #include <disclaimer.h>
Also at: "http://www.ncf.carleton.ca/~aa735/" | To err is human ...
Received on Wed Aug 20 1997 - 00:00:00 CDT

Original text of this message

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