Stored Procedure Properties
| Name | Value |
|---|---|
| Owner | dbo |
| Created | 2004-05-31 |
| Startup | False |
| Encrypted | False |
Creation Options
| Name | Value |
|---|---|
| QUOTED_IDENTIFIER | OFF |
| ANSI_NULLS | OFF |
Parameters
| Name | DataType | Length | Type |
|---|---|---|---|
| @PostID | int | 4 | INPUT |
Total: 1 parameter(s)
SQL
SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS OFF GO create procedure forums_GetAllButOneForum ( @PostID int ) AS -- get all of the forums EXCEPT for the forum that PostID exists in DECLARE @ExcludeForumID int SELECT @ExcludeForumID = (SELECT ForumID FROM Posts (nolock) WHERE PostID = @PostID) SELECT * FROM Forums (nolock) WHERE NOT (ForumID = @ExcludeForumID) AND Active = 1 GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO