Re: Coalesce() in Informix SE
Posted in 2003
preetinder dhaliwal — — source: Usenet: comp.databases.informix
does nvl work? - imast.cost+nvl(imextras.addncost,0)
Martyn Shiner wrote:
>
> I have a query that needs to add two columns, one of which may contain a
> null (as a result of an outer join) - obviously the null propagates which
> causes me problems. My docs suggest that SE doesn't support the ANSI
> coalesce() function - is there a workaround?
>
> Query is as follows:
>
> SELECT imast.item, (imast.cost+imextras.addncost) itemcost
> FROM imast outer imextras
> WHERE imast.item=imextras.item>
> I want to write:
> SELECT imast.item itemcode, (imast.cost+coalesce(imextras.addncost,0))
> itemcost
> FROM imast outer imextras
> WHERE imast.item=imextras.item
>
> Any ideas?
> Regards
>
> Martyn
sending to informix-list