Question: IF OBJECT _ ID ( N ' dbo . ufnGetInventoryStock', N ' FN ' ) IS NOT NULL DROP FUNCTION ufnGetInventoryStock; GO CREATE FUNCTION dbo.ufnGetInventoryStock
IF OBJECTID NdboufnGetInventoryStock', NFN IS NOT NULL
DROP FUNCTION ufnGetInventoryStock;
GO
CREATE FUNCTION dbo.ufnGetInventoryStock@ProductID int
RETURNS int
AS
Returns the stock level for the product.
BEGIN
DECLARE @ret int;
SELECT @ret SUMpQuantity
FROM Production.ProductInventory p
WHERE pProductID @ProductID
AND pLocationID ;
IF @ret IS NULL
SET @ret ;
RETURN @ret;
END; covert this procedure into function
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
