Re: Null variables
Posted in 1998
Florin Micle wrote:
> Hi all,
>
> Does anyone know how can I see if a passed variable into a stored
> procedure in Informix (dbaccess) has null value? I can't compare it with
> null because I get a syntax error (null - undeclared variable) if I pass
> null value into another variable the evaluation of null = null returns
> false! I wish it returned true...
> Can anyone give me a solution for this?
>
> Thanks,
> Florin.
>
>
Real simple (in SPL):
IF variable IS NULL
or
IF variable IS NOT NULL
but never
IF variable = NULL
Cheers,
Avi.
************************************************************************
/\\ \\ /| Avi Abrami, Analyst/Programmer, Telegate Ltd.
/__\\ \\ / | 7 Haplada Street, Or-Yehuda, ISRAEL
/ \\ \\/ | Phone:+972-3-5388717 Fax:+972-3-5335877 eMail:avia@telegate.co.il