Hi experts,
I have two result set like this
district Raised approved
xyz 3 2
abc 4 2
pqr 3 2
To get this output am using a query like
Select
IMS.IPS_District_Name as [District Name],
SUM(iMs.IPS_OB) as Raised,
Sum(ImS.IpS_TotRaised) as Approved from
Intermediate_Overdue_Statistics IOS
inner join Intermediate_MonthWise_Statistics IMS
on ios.IOS_District_Code=ims.IpS_District_Code AND
IOS.IOS_Taluk_Code =ImS.IpS_Taluk_Code
where IPS_Month =3 and ims.IPS_Year =2014
group by ImS.IpS_District_Name
order by IMS.IPS_District_Name
another result set is
district pending
xyz 1
abc 2
pqr 1
to get this result i have used query like this
Select IOS_District_Name,SUM(IOS_TotOverdue )+SUM (IOS_TotWithinTime) as [Pending]
from Intermediate_Overdue_Statistics
where datepart(mm,IOS_DOT)=3 and datepart(yyyy,IOS_DOT)=2014
GROUP by IOS_District_Name
order by IOS_District_Name
now finally i want out put like this
district Raised Approved Pending
xyz 3 2 1
abc 4 2 2
pqr 3 2 1
Can any one please help me to solve this issue??
(Thanks in advance)