I have required "No. of days" field in below alert query which will Show, No. of days from which items are below reorder qty. Days are going to increasing until it's not going above to reorder qty. Items are managed by warehouse wise.
SELECT T0.[ItemCode], T1.[ItemName], T0.[WhsCode], T0.[OnHand], T0.[MinOrder] FROM OITW T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[OnHand] < T0.[MinOrder] AND T0.[WhsCode] = '01'
Appreciate if anyone could help. Thanks in advance.