Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to force an oracle procedure to return an empty string?
You are correct. This is a bit frustrating and a lot of people complained
about this, but it's as it is: empty varchar2 is NULL in Oracle. So you
can't compare to an empty string, you should use IS [NOT] NULL if you
want to check is string is [not] empty.
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "Richard Armstrong" <richard.armstrong_at_juno.demon.co.uk> wrote in message news:1019011006.14993.0.nnrp-08.9e9809ca_at_news.demon.co.uk...Received on Wed Apr 17 2002 - 00:51:41 CDT
> I think Oracle treats zero length strings as NULL.
>
> "Paul Fell" <novaweb_at_iinet.net.au> wrote in message
> news:4b270a4e.0204161632.194123ab_at_posting.google.com...
> > Oracle 9i.
> >
> > I'm using nvl(<field>,'') to return an empty string in a refcursor
> > recordset, but this still returns a null value through the jdbc thin
> > driver. Is it oracle or the driver? If it's oracle, is there a way of
> > forcing the return of an empty string or can't oracle tell the
> > difference?
> >
> > thanks
> > Paul
>
>