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: problems with default parameter values

Re: problems with default parameter values

From: kevin Sedota <sedotatx1_at_comcast.net>
Date: Thu, 5 Aug 2004 19:02:46 -0700
Message-ID: <-bidncsAgqXzVo_cRVn-gw@comcast.com>


I can only presume that I was getting something else. The default value was null and no value was passed in from the c# .Net program or the value was explicitly set to null. However the condition failed when it should not have. we generally code things like

create or replace procedure
( param in number := null
 param2 in number DEFAULT null)
as
SELECT col1,col2
FROM sometable
WHERE ((param is null) OR (param = col1)) AND ((param is null) OR (param = col2))

In this case the version that had the param coded with the := behaved differently than the one coded with DEFAULT.

"Christian Antognini" <christian.antognini_at_trivadis.com> wrote in message news:4111e4f3$1_at_post.usenet.com...
> **** Post for FREE via your newsreader at post.usenet.com ****
>
> Hi Kevin
>
> > These worked fine when the parameter was a varchar but for anything else
> it
> > would not work.
>
> What does this mean? The default value was not used, you get an error or
> something else....
>
> > everything worked fine. The documentation states that := should be use
for
> > defining default numerics. something like
> >
> > p2 in number := 7
> >
> > which would seem to imply that null in place of 7 should be ok. But it's
> > not.
> >
> > Is this an error in the documentation?
>
> According to the documentation both can be used.
>

http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10807/13_elems036.htm#sthref1788
>
> Chris
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
> http://www.usenet.com
> Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Received on Thu Aug 05 2004 - 21:02:46 CDT

Original text of this message

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