The stored procedure:
ALTER PROC [Admin].[sp_Ques]
(
@QuesID bigint
)
AS
BEGIN
IF @QuesID = 0
SET @QuesID =NULL
SELECT FQ.QuesID, FQ.Ques,QuesAns
F
The scope of FQ is limited to the first select statement.
Your options include: