Because of the LEFT OUTER JOIN you'll get nulls for all DCMIINVENTORY fields if there are no inventory records. You can use NVL() function to convert nulls into zeros
IIF( ( NVL(DCMIINVENTORY.iQtyOnHand,0) - ;
NVL(DCMIINVENTORY.iQtyCommitted, 0)) > 0, ;
(NVL(DCMIINVENTORY.iQtyOnHand,0) - ;
NVL(DCMIINVENTORY.iQtyCommitted,0)), 0000000000) AS "iQtyAvailable" ,;
>I have a view where this error occurs occsionally. I will post the view definition below, but I think the error is comming out of one field expresion which is:
>
>IIF((DCMIINVENTORY.iQtyOnHand - DCMIINVENTORY.iQtyCommitted)>= 0,(DCMIINVENTORY.iQtyOnHand - DCMIINVENTORY.iQtyCommitted),0000000000) AS "iQtyAvailable" ,;
>
>the error was generared this morning, while testing the APP at the clients site, where the inventory table did not contain a record for this item, which I suspect caused the error.
>
< SNIP >
--sb--