Click here to Skip to main content
Sign Up to vote bad
good
See more: C#4.0
can any one helpfor writing linq querry for below sql statemant?
 
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
Posted 7 Feb '13 - 1:16
Edited 7 Feb '13 - 1:24
Ankur\m/44.2K

Comments
Ankur\m/ - 7 Feb '13 - 7:24
Could you also show us what you tried?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 523
1 Mahesh Bailwal 393
2 Maciej Los 205
3 Aarti Meswania 200
4 Tadit Dash 145
0 Sergey Alexandrovich Kryukov 9,607
1 OriginalGriff 7,214
2 CPallini 3,943
3 Rohan Leuva 3,261
4 Maciej Los 2,758


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 7 Feb 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid