preetinder dhaliwal
2003-07-28 22:26:09 UTC
does nvl work? - imast.cost+nvl(imextras.addncost,0)
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?
SELECT imast.item, (imast.cost+imextras.addncost) itemcost
FROM imast outer imextras
WHERE imast.item=imextras.item
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-listnull (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?
SELECT imast.item, (imast.cost+imextras.addncost) itemcost
FROM imast outer imextras
WHERE imast.item=imextras.item
SELECT imast.item itemcode, (imast.cost+coalesce(imextras.addncost,0))
itemcost
FROM imast outer imextras
WHERE imast.item=imextras.item
Any ideas?
Regards
Martyn