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_GetForumByPostID ( @PostID int ) AS -- get the Forum ID for a particular post SELECT ForumID, ForumGroupId, ParentId, Name, Description, DateCreated, Moderated, DaysToView, Active, SortOrder, IsPrivate = ISNULL((SELECT DISTINCT ForumID FROM PrivateForums WHERE ForumID = F.ForumID), 0), DisplayMask FROM Forums F (nolock) WHERE ForumID = (SELECT ForumID FROM Posts (nolock) WHERE PostID = @PostID) GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO