UPDATE orderdetails  JOIN orders ON orderdetails.orderid = orders.orderid SET qtyonpackingslip = NULL WHERE orders.orderstatus IN ('Ready to Ship','Pending Shipment') AND orderdetails.qtyonhold <> 0;  
UPDATE orderdetails SET qtyonpackingslip = NULL, qtyonhold = quantity, qtyshipped = 0 WHERE qtyonpackingslip > 0 AND qtyonpackingslip < 999  
UPDATE orderdetails JOIN orders ON orderdetails.orderid = orders.orderid SET qtyonpackingslip = 0 WHERE orders.orderstatus IN ('Ready to Ship','Pending Shipment') AND orderdetails.qtyonhold = 0; -- This is for cancels, don't want to set the QtyOnPackingSlip to 0 since that is how we mark things as recevied/shipped 
UPDATE orderdetails od JOIN orders o ON o.orderid = od.orderid SET od.qtyonpackingslip = -1 WHERE od.quantity = 0  AND od.qtyonpackingslip IS NULL AND o.orderstatus != 'New';