Hi i am making a stored procedure with multiple select statements when i execute them than different resultset are maken for each select statement all i need is to get one resultset from all select statements of sql quries in the stored procedure......HERE is the SP code..
SET NOCOUNT ON;
Select COUNT(*) as totalEmployees From dbo.Add_Employees
Select DISTINCT dbo.Add_Employees.gender, COUNT(Add_Employees.employee_uniqueId) as AccGender
From dbo.Add_Employees
Group BY(Add_Employees.gender)
Select DISTINCT dbo.Add_Employees.department, COUNT(Add_Employees.employee_uniqueId) as Accdepartment
From dbo.Add_Employees
Group BY(Add_Employees.department)
Select DISTINCT dbo.Add_Employees.designation, COUNT(Add_Employees.employee_uniqueId) as Accdesignation
From dbo.Add_Employees
Group BY(Add_Employees.designation)
Select DISTINCT dbo.Add_Employees.grade, COUNT(Add_Employees.employee_uniqueId) as AccGrade
From dbo.Add_Employees
Group BY(Add_Employees.grade)
Select DISTINCT dbo.Add_Employees.country, COUNT(Add_Employees.employee_uniqueId) as AccCountry
From dbo.Add_Employees
Group BY(Add_Employees.country)
Select DISTINCT dbo.Add_Employees.city, COUNT(Add_Employees.employee_uniqueId) as AccCity
From dbo.Add_Employees
Group BY(Add_Employees.city)
END