on 04-08-2010 12:03 PM
Hello Experts
i am maintaining the batches in inventory for medicines now i want to generate an alert according to expiry date how should i design a query for doing such can u explain with example?
You can try something like this:
SELECT T0.[ItemCode],T0.[BatchNum], T0.[WhsCode], T0.[Quantity], T0.[ExpDate],
datediff(d,getdate(),T0.[ExpDate] ) 'remaining days'
FROM OIBT T0
WHERE datediff(d,getdate(),T0.[ExpDate] )<100 and T0.[Quantity]>0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SELECT batchnum FROM OIBT T0 where ExpDate=getdate()
Regards,
Sachin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where u did mention the expiry date
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.