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: Oracle NULL vs '' revisited

Re: Oracle NULL vs '' revisited

From: William Robertson <williamr2019_at_googlemail.com>
Date: Mon, 20 Aug 2007 09:03:35 -0700
Message-ID: <1187625815.154174.172740@r34g2000hsd.googlegroups.com>


On Aug 18, 3:06 am, Matthew Harrison <m.harris..._at_craznar.com> wrote:
> zigzag..._at_yahoo.com wrote:
> >It has always worked for me. Oracle may have messed up
> > things but if a disciplined approach by keeping null indicator
> > separate from the actual value is followed all through the code,
> > things will still work.
>
> So , I have a stored proc with a parameter MSG.
>
> I have a table with values MSG and MSGISNULL.
>
> How do I tell the parameter is '' or NULL ?
>
> Or does the client user have to pass two parameters and do the test in
> their own langauge.
>
> The catch here is that if it was a number, I just wouldn't put a value
> in ... that is ... the stored procedure would not have been called.
>
> So - how do I detect, and act on someone NOT calling the stored
> procedure and set a flag ?
>

Perhaps some demo code would make the scenario clearer.

If myproc() takes an argument with a default of NULL, you can distinguish between

myproc()

and

myproc(NULL)

by using overloading. I'm not sure that is your scenario though. You may also be able to do something with CHAR variables (normally considered evil for this sort of reason). Received on Mon Aug 20 2007 - 11:03:35 CDT

Original text of this message

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