cancel
Showing results for 
Search instead for 
Did you mean: 

EXP Date Alert

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member204969
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

SELECT batchnum FROM OIBT T0 where ExpDate=getdate()

Regards,

Sachin

former_member196081
Active Contributor
0 Kudos

where u did mention the expiry date