OldSlowDog
Programmer
Hi all,
I am trying to develop a SP for looking up the Quantity of a specific item at a specific warehouse. My idea is to pass the Item Name and Warehouse Location to the SP and have it return the Quantity.
CREATE GetQuantity_sp
-- =============================================
-- Create date: 5/11/2008
-- Description: Passing ItemName and WarehouseLoc to SP
-- returning the Quantity info.
-- Usage: QtyOnHand = EXEC GetQuantity_sp 'item' , 'Wh'
-- =============================================
@Item varchar(50)
@Warehouse varchar(30)
AS
SET NOCOUNT ON
SELECT I.Quantity
FROM Inventory I
WHERE I.ItemName = @item
AND I.WarehouseLoc = @Warehouse
Return(??)
My problem is I could not figure out how to return the quantity.
Thanks.
I am trying to develop a SP for looking up the Quantity of a specific item at a specific warehouse. My idea is to pass the Item Name and Warehouse Location to the SP and have it return the Quantity.
CREATE GetQuantity_sp
-- =============================================
-- Create date: 5/11/2008
-- Description: Passing ItemName and WarehouseLoc to SP
-- returning the Quantity info.
-- Usage: QtyOnHand = EXEC GetQuantity_sp 'item' , 'Wh'
-- =============================================
@Item varchar(50)
@Warehouse varchar(30)
AS
SET NOCOUNT ON
SELECT I.Quantity
FROM Inventory I
WHERE I.ItemName = @item
AND I.WarehouseLoc = @Warehouse
Return(??)
My problem is I could not figure out how to return the quantity.
Thanks.