View Single Post
  #2 (permalink)  
Old November 10th, 2004, 10:30 PM
englere englere is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Atlanta, Georgia, USA.
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This looks inefficient. Why not try a subquery:

SELECT NC1.CatID, NC1.Name
FROM News_Categories NC1
WHERE NC1.CatID =
  (select NC2.ParentCatID
   FROM News_Categories NC2
   WHERE NC2.CatID = @CatID)

I suspect your real problem is with the data.

Eric