Re: Problems with null value in SP on 7.3
Posted in 1998
Felix Mathews wrote:
> Alexander V.Didytch wrote:
>
> > <snip>
> > create procedure if_null(what int)
> > returning int;> >
> > if what is null
> > then return 0;
> > else return what;
> >
> > end if;
> > end procedure;
> >
> > And now lets call it:
> >
> > execute procedure if_null(null)> >
> > In 7.2x its returns 0,
> > in 7.3 it tells the following error:
> > SQL Error (-696) variable (what ) has undefined value
> >
>
> <snip>
>
> Hi - Alexander,
>
> I don't know about any (N)ew (T)rouble bugs in 7.30, but in Unix IDS 7.2x
> and 7.30 gives following results from dbaccess :
>
> execute procedure if_null(1);>
> (expression)
>
> 1
>
> execute procedure if_null(null);>
> (expression)
>
> 0
>
The most funniest thing is that its unstable error -- when procedures was
recreated
(they was created via dbimport) it's start working without troubles. And the
most strangest thing is that when I'm created it by hand -- it's ain't work
but next time I'll tries to workout it it works find with the same script.
With Informix I'm start believe in ghosts :)
Sincerely, Alexander
--
Alexander V.Didytch, Kyiv, Ukraine
Data is like garbage. You better be sure what you're going to do with it
before you collect it.
--Mark Twain