Friday 11 October 2013

07. Create a batch to check the availability of the product, Chaining Bolts, in the stock. If the product is available, display a message, 'The Stock is available'. If the product is not available, display a message, 'The Stock is not available'.

Declare @MakeFlag bit
select @MakeFlag=MakeFlag from Production.Product
Where Name ='Chaining Bolts'
If @MakeFlag=1
Print 'The Stock is available'
else
Print 'The stock is not available'

No comments:

Post a Comment