View Single Post
  #7 (permalink)  
Old June 19th, 2003, 02:56 PM
gapoce gapoce is offline
Authorized User
 
Join Date: Jun 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is a paste of the procedure:

CREATE PROCEDURE Gw_Select_Categories
@CategoryId int
AS
    IF @CategoryID = -1
        SELECT CategoryId, Description, Notes, ParentCategoryId FROM Categories Order by Description
    ELSE
        SELECT CategoryId, Description, Notes, ParentCategoryId FROM Categories WHERE ParentCategoryId = @CategoryId ORDER BY Description
GO