Here's a trimmed down version of the original query. Its not giving any output. I am expecting two result sets
1. All records from table
2. Count Of all records from table
declare @rows nvarchar(50), @query nvarchar(max)
set query = 'select @rows+' = count(*) from tblBranch; select * from tblBranch;'
execute sp_executesql @query
The two result sets will later be used in C#.