SELECT ME.MtgEventID, E.EventDesc, E.EventSDesc, ME.MtgEventQty MtgEventQty,
NVL(SUM(RME.EventQty), 0) TotalDistributed, ME.MtgEventQty - NVL(SUM(RME.EventQty), 0) AvailQty, ME.ModDt
FROM MtgEvent ME, Event E, RegMtgEvent RME
WHERE ME.EventID = E.EventID
AND ME.MtgID = 10 -- 2005 RI Convention
AND ME.MtgEventID = RME.MtgEventID (+)
GROUP BY ME.MtgEventID, E.EventDesc, E.EventSDesc, ME.MtgEventQty, ME.ModDt
order by E.EventDesc
This is my query...I need to delete records where AvailQTY=0.
NVL(SUM(RME.EventQty), 0) TotalDistributed, ME.MtgEventQty - NVL(SUM(RME.EventQty), 0) AvailQty, ME.ModDt
FROM MtgEvent ME, Event E, RegMtgEvent RME
WHERE ME.EventID = E.EventID
AND ME.MtgID = 10 -- 2005 RI Convention
AND ME.MtgEventID = RME.MtgEventID (+)
GROUP BY ME.MtgEventID, E.EventDesc, E.EventSDesc, ME.MtgEventQty, ME.ModDt
order by E.EventDesc
This is my query...I need to delete records where AvailQTY=0.