June 30, 2010 at 1:27 am
I suppose you're not running this query on a SQL Server 2008.
I think you're on SQL Server 2005.
-- Gianluca Sartori
June 30, 2010 at 6:54 am
Try splitting this line:DECLARE @CategoryId Int =
(
SELECT CategoryId
FROM dbo.[Forums.Categories]
WHERE ForumId = @ForumId
AND ParentCategoryId IS NULL
); --12;
into:
DECLARE @CategoryId Int;
SELECT @CategoryID = CategoryId
FROM dbo.[Forums.Categories]
WHERE ForumId = @ForumId
AND ParentCategoryId IS NULL;
And let us know if that helps.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply