I want to fire an alert when the quantity of inventory goes below the minimum inventory.I created query as
if (SELECT onhand from oitm where itemcode='CHPESS0002') < 1000 print 'The quanatity has gone below the minimum inventory.'
The alert does not fire for the above query.It fires for,
SELECT onhand from oitm where itemcode='CHPESS0002'
I want to fire it for specific condition and display user defined message i.e.'The quanatity has gone below the minimum inventory.