CREATE Procedure usp_BindQans(@UserName varchar(50)) AS BEGIN SELECT T1.QuestionNo, T2.Q_Id, T2.QuestionName, T1.OptionName,T2.Require FROM (SELECT T.QuestionNo, STUFF( (SELECT '$' + A.OptionName FROM Qanswers A WHERE A.QNo = T.QuestionNo FOR XML PATH('')),1,1,'') AS OptionName FROM Question T GROUP BY T.QuestionNo) T1 JOIN Question T2 ON T1.QuestionNo = T2.QuestionNo where T2.UserName=@UserName end
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)