select qi.qtyonhand + qd.delqty as teste,
qi.itemname
from qitem qi, qdel qd
where qi.itemname = qd.itemname
and qd.deptname = 'recreation';
select qi.qtyonhand - qs.saleqty as teste,
qi.itemname
from qsale qs, qitem qi
where qi.itemname = qs.itemname
and qs.deptname = 'recreation';
I'm trying to update the qitem quantity count by adding from the qdel table's quantity and by subtracting from the qsale table's quantity. I'm trying to put it all into one column, however there may not be items in the qdel table with the department name of "recreation" so when I try to put the select statements into one, it leaves out some items from qitems.
q?