In reference to my Previous Question I am not sure how can I set and then return a column data value with out saving it to table.
if @datafield = 1
set ColumnA.table2=1
else if @datafield = 2 AND @datafield2 = 3
set ColumnA.table2= 0
else
return (SELECT ColumnA.table2 FROM table1 INNER JOIN table2 on table1.id and table2.id Where @datafield3 = 0)
I am not sure how to return after setting values, I did tried begin and end , not working tho
simplest thing you can do to return value