By completing this guide, you should be able to understand how Trivia event questions are loaded.
Stored Procedure: _EventTrivia_LoadQuestion
Parameters:
@Question VARCHAR(255) OUTPUT - Loaded question text
@Answer VARCHAR(255) OUTPUT - Loaded answer text
This procedure is used by the Trivia event to load a random question and answer from
_RefEventTrivia. You do not need to edit this procedure unless you want to customize how questions are selected.
USE [vPlus]
GO
/****** Object: StoredProcedure [dbo].[_EventTrivia_LoadQuestion] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- ALTER date: <ALTER Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[_EventTrivia_LoadQuestion]
@Question VARCHAR(255) OUTPUT,
@Answer VARCHAR(255) OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SELECT TOP 1 @Question = StrQuestion, @Answer = StrAnswer FROM _RefEventTrivia ORDER BY NEWID();
END