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: LIKE operator causes server crash

Re: LIKE operator causes server crash

From: Dan Halbert <halbert_at_bbn.com>
Date: Sun, 21 Feb 1999 18:31:59 GMT
Message-ID: <halbert.919621597@franklin>


mstout2468_at_aol.com (MStout2468) writes:
> You also have a
> nvl(length(arg1),0)

>How does SQL behave when arg1 is null?
>(I don't have access right now...)

>try

>length(nvl(arg1,''))

>This is iffy, but it is another place where arg1 might
>play a detrimental role.

It turned out that my problem was due to a datatype mismatch in Pro*C: I was passing a char* into a PL/SQL procedure that was looking for a varchar2.

In Oracle presently, '' is the same as NULL, which is no fun. Hence, length ('') = length(NULL) = NULL, which is why I did the "nvl(length(arg1),0)" above. "length(nvl(arg1,''))" would return NULL if arg1 were NULL.

Regards,
Dan Received on Sun Feb 21 1999 - 12:31:59 CST

Original text of this message

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