Friday 11 October 2013

08. Create a stored procedure that returns the standard cost of a given product.

create Procedure PrcGetCostDetail2 @ProductID int,
@standardCost money Output
as
Begin
If Exists (select * from Production.ProductCostHistory
Where ProductID=@ProductID)
Begin
select @standardCost=StandardCost from
Production.ProductCostHistory
Return 0
end
else
return 1
end

No comments:

Post a Comment