Currently I am returning a boolean value as "1" or "0" or value of a column let say column A in one of my stored procedure and it works perfectly, however in one of application I am trying to get value like this
string temp = reader.TryGetValue("ColumnA", out licenseStatus) ? temp : string.Empty;
Stored procedure is doing something like this,
if @datafield = 1
return 1
else if @datafield = 2 AND @datafield2 = 3
return 0
else
return (SELECT ColumnA.table2 FROM table1 INNER JOIN table2 on table1.id and table2.id Where @datafield3 = 0)
Now I want to return result as value of ColumnA always instead of sending "0" or "1" as I am not allowed to make changes to code in application.
Is it possible ? I can't make any changes to ColumnA value at all either.
EDIT
I already mentioned in my question that stored procedure is doing what its suppose to do but not working with my code, as I am returning 1 or 0 at some point and my code isn't getting it as columnA so its setting it up empty, I want to return 0 or 1 as value of ColumnA but at same time I don't want to change value of columnA in table2..
:)