Stored Procedures [dbo].[Forum_Polls_PollGet]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@PollIDint4
SQL Script


CREATE PROCEDURE dbo.[Forum_Polls_PollGet] @PollID INT
AS
    SELECT  PollID,
            Question,
            ShowResults,
            CreatedDate,
            EndDate,
            TakenMessage,
        ThreadID,
        ModuleID,
        (SELECT COUNT(UserAnswerID) FROM dbo.Forum_Polls_UserAnswers WHERE PollID = @PollID) As TotalVotes
    FROM    dbo.Forum_Polls_Polls
    WHERE   PollID = @PollID

GO
Uses