I have one table named task_assignment.
It has following 6 fields named as:
testId,quesId,evaluatorId,studId and marks
Actually this table is used to store marks for each test including each evaluators marks for each students by question id wise.
I have testId=1, quesId=Q1 and studId=S1 as a input. So, i want to get the following information in the select query.ie,Both evaluators(E1,E2) marks for the given input.
The sql query don’t written more than one row for this…I want query output is :20,15 in a single row.
Please guide me to get out of this issue…

I think you won’t be able to get your desired output
20, 15, since there is only one record which satisfies your criteriatestId = 1, quesId = Q1, studId = S1.But to answer your question, here’s my query:
I’ve tried it in SQL Fiddle.
EDIT 1
If you want to parse the output of the query in your
C#code to store them in separate variables, you can use theSplitfunction:The code is still error-prone depending on the value of the
marksvariable, just make sure you have validated the value.This might be unrelated to the question, but still to help you on your task, that’s my answer.