Re: NVL in Informix?
Posted in 1998
Andreas Zeugswetter — — source: Informix-list mailing list archive (1991-1998)
You can create a stored procedure to do just that:
create procedure nvl(a varchar(255),b varchar(255))
returning varchar(255);if a is null then
return b;
else
return a;
end if;
end procedure;
Probably won't work for all datatypes though.
Andreas
P.Xeros wrote:
>
> If a (char)column has null values and you concatenate(||) this column
> with another non null(char), then you will get a null value(expression).
> Oracle for example has NVL(column, "value") function
> which allows you to "say" what value you want to be returned
> if the value of the column is null. Is there any way to do this in Informix
> without writing 4gl code(just SQL statements)?
>
> Thanks for your time,
>
> P.Xeros