getting one result table from two resultset query
query 1 :
select EmpID, count(ProgramId) as "TotalPrograms",
SUM(Cast([NoOfDays] as INT) ) as "Total No of Days"
from **EmpTrainingInfo** group by EmpID
result output : EmpID Total Programs ,Total No Of Days
Query 2 :
select AssignedTo [EmpID] ,count(ProgramId) as "Total Foreign Visits"
from **ProgramInfo** where status in ('Completed','Assigned')
and Country NOT IN ('Country1','Kountry1 ','cntry1') group by
AssignedTo
result output : EmpID, Total Foreign Visits
How can I combine these two to get the Output columns in one table :
**EmpID** , **Total Programs** ,**Total No Of Days**,Total Foreign Visits
Any tips will be appreciated..
No comments:
Post a Comment