får inte till denna:
om @Level3 = 0 då får inte ParentIdno vara lika som SubIDno.
felkod: Incorrect syntax near '<'.
ALTER Procedure upCategory
@CategoryId int,
@Level3 int
As
Set NoCount On
Select a.IDno, a.ParentIDno, a.TopIDno, a.SubIDno, a.Fullname, a.Enabled, a.CreateDate
From Category a
Where Case When @Level3=0 Then ParentIDno <> SubIDno End
Order By a.TopIDno, a.SubIDno, a.ParentIDno, a.Fullname