I do not have SSRS/Visual Studio and I am running multiple queries in SSMS. The first Query provides an Overall Summary of all Data:
Select
'All Divisions',
Count(b.EmployeeID) As Numerator,
Count(a.EmployeeID) As Denominator,
Cast(Count(b.EmployeeID) As nvarchar) + ' / ' + Cast(Count(a.EmployeeID) As nvarchar) As FinalRatio
From @tbl1 a Left Join @tbl2 b On a.EmployeeID = b.EmployeeID
The second query:
Select
a.Division,
Count(b.EmployeeID) As Numerator,
Count(a.EmployeeID) As Denominator,
Cast(Count(b.EmployeeID) As nvarchar) + ' / ' + Cast(Count(a.EmployeeID) As nvarchar) As FinalRatio
From
@tbl1 a Left Join
@tbl2 b On a.EmployeeID = b.EmployeeID
Group By a.Division
... and the third one has all the details with no aggregation/summarization.
Is it possible to export all three result sets into one Excel spreadsheet in one operation - manually or some other way?