Basically, I wanted to return only one row and one column of the result from the stored procedure.
For example, my sample data and table look like this:
ColoumA INT ColoumB INT ColoumC NVARCHAR(MAX) ColoumA ColoumB ColoumC 1 1 ErrorMessage1 2 2 ErrorMessage2 3 3 ErrorMessage3
After I successfully completed the successfully saved procedure, If Successful, the return result is a string value that combines all the details above. Such as
Or in another Word, I wanted to save all the value in TBL.rows[0][0]
in c # .net when i 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 was expecting something like this:
Sample Output ColoumA: 1, ColoumB 1, ErrorMessage1 ColoumB: 2, ColoumB 2, ErrorMessage2 ColoumC: 3, ColoumC 3, ErrorMessage3
Can I make a selection using T-Sql Statment? And if it can be done? how can i get it?
Hope someone can understand and answer my question.
Thanks:
PS: Sorry for my bad English Explanation