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

Home -> Community -> Usenet -> c.d.o.server -> Re: 8.0.5 -> 8.1.6 PL/SQL Problem

Re: 8.0.5 -> 8.1.6 PL/SQL Problem

From: Matthew Fuller <matthewlf_at_my-deja.com>
Date: Thu, 01 Feb 2001 12:26:35 GMT
Message-ID: <95bkln$eh3$1@nnrp1.deja.com>

In article <3A788771.CC52EC6C_at_0800-einwahl.de>,   Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de> wrote:
> We found the following works in 8.0.5 (Sparc Solaris) but not in
 8.1.6:
>
> begin
> if nvl (5, ' ') = nvl (6, ' ') then
> null;
> end if;
> end;
> /
>
> In 8.1.6.3.0 we get ORA-01722.
>
> I found a init.ora setting of plsql_v2_compatibility which I set to
 true.
> However, this error persists.
>
> Anyone got an idea?
>
> Martin
>
>

Martin,

The bigger question to me is why did that work on 8.0.5. I can't remember the last time (if ever) that I saw that work. The NVL function expects the datatypes to be the same for both of its parameters. So it wants you to stick a number in the second parameter and not ' '. So, you have two quick options, either do something like this:

NVL(5, -1) -- Just be sure -1 will never really occur in your data. NVL(TO_CHAR(5),' ') -- Now they're both character

HTH. Matt.

Sent via Deja.com
http://www.deja.com/ Received on Thu Feb 01 2001 - 06:26:35 CST

Original text of this message

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