| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: LIKE operator causes server crash
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
![]() |
![]() |