Basically, i wanted to return only one row and one column of result from a stored procedure..
For example, my sample data and table is like this below:
ColoumA INT
ColoumB INT
ColoumC NVARCHAR(MAX)
ColoumA ColoumB ColoumC
1 1 ErrorMessage1
2 2 ErrorMessage2
3 3 ErrorMessage3
After i Execute Successfully the stored procedure successfully,If Successful, the return result is a string value that combine all the detail above.Such as
Or in another Word, i wanted to stored all the value in TBL.rows[0][0]
in C#.net when i get call the Code
String ReturnValue = "";
Datatable tbl = new Datatable(AREA);
ReturnValue = tbl.Rows[0][0].ToString().Trim();
Console.Writeline("Sample Output");
Console.Writeline(ReturnValue);
I Expected something like this:
Sample Output
ColoumA: 1, ColoumB 1, ErrorMessage1
ColoumB: 2, ColoumB 2, ErrorMessage2
ColoumC: 3, ColoumC 3, ErrorMessage3
Am I Able to do the selection using T-Sql Statment? And if can do So? how can i get it?
Hopefully Someone can understand and answer my question.
Thank You:
PS:Sorry For my poor English Explanation