Using coalesce in a select statement - RemainingInventory
Is it possible to use RemainingInventory to filter a table in a recordset?
We've tried this:
SELECT wbprodID, wbprodTITLE, wbprodSUMMARY, wbprodPRICE, wbprodIMG, wbprodWEIGHT, wbprodSTOCK - (SELECT Coalesce(SUM(DetailQuantity),0) FROM WBorders INNER JOIN WBorderdetails ON WBorderdetails.DetailOrderID = WBorders.OrderID WHERE OrderDate > wbprodSTOCKDATE AND DetailProductID = wbprodID) AS RemainingInventory, wbprodDELETE FROM WBproducts WHERE RemainingInventory > 0
...but this produces an "Error in SQL syntax" error.
Thank you
NJ