SELECT od.OrderDetailID, od.QtyOnPackingSlip, od.TotalPrice, od.Quantity, od.QtyOnHold, od.QtyShipped, od.ProductNote, o.OrderID, o.OrderStatus, o.PaymentAmount
FROM orderdetails od
JOIN orders o ON od.OrderID = o.OrderID
WHERE o.OrderStatus NOT IN ('Shipped','Cancelled','Returned','Partially Returned') 
AND o.OrderID NOT IN (SELECT OrderID FROM trackingnumbers) 
AND o.OrderID < 8120283
AND od.ProductCode NOT LIKE 'DSC%'
ORDER BY o.OrderID