All pastes #903200 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-14 01:47 UTC
rendered paste body
USE [eRaceClub]
GO
/****** Object:  StoredProcedure [dbo].[LookupProductsByCategoryId]    Script Date: 02/13/2008 18:46:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


----------------------
-- Product Procedures
----------------------

-- LookupProductsByCategoryId
ALTER PROCEDURE [dbo].[LookupProductsByCategoryId] @CategoryId int
AS
  BEGIN
    IF @CategoryId IS NULL
      raiserror('LookupProductsByCategoryId - Must enter Category Id',  16,  1)
    ELSE
      SELECT  ProductId,
              Description,
						  SalesPrice,
						  QuantityOnHand 
      FROM    Product
		  WHERE   CategoryId = @CategoryId
    -- END IF
  END
RETURN