SELECT fun_getareaName(areaid) prevAreaName, AreaName,HospitalName,NVL(Levels,'')||NVL(LevelDetail,'') Levels,Nature, case CountyOver when 1 then '县级以上' Else '' end CountyOver,B.HospitalID,PurchaseAmountTotal, WareHouseAmountTotal, DistributeAmountTotal, PurchaseCountTotal,DistributeCountTotal, WareHouseCountTotal,ReturnhouseCountTotal,ReturnhouseAmountTotal,CanclePurchaseCount,
CanclePurchaseAmount,
WebMiningCountTotal,
WebMiningAmountTotal,
InvoiceCountTotal,
InvoiceAmountTotal,
SettlementCountTotal,
SettlementAmountTotal FROM View_HospitalArea left JOIN (select A.HospitalID,PurchaseAmountTotal, WareHouseAmountTotal, DistributeAmountTotal,PurchaseCountTotal,DistributeCountTotal, WareHouseCountTotal,ReturnhouseCountTotal,ReturnhouseAmountTotal,CanclePurchaseCount,
CanclePurchaseAmount,
WebMiningCountTotal,
WebMiningAmountTotal,
InvoiceCountTotal,
InvoiceAmountTotal,
SettlementCountTotal,
SettlementAmountTotal from(SELECT HospitalID,SUM(PurchaseAmount) PurchaseAmountTotal,SUM(WarehouseAmount) WareHouseAmountTotal,SUM(PurchaseCount) PurchaseCountTotal, SUM(DistributeCount) DistributeCountTotal, SUM(WareHouseCount) WareHouseCountTotal,SUM(DistributeCount*Price) DistributeAmountTotal FROM View_Supervise WHERE 1=1 and PurchaseCount>0 and OrderStatus ='1' and Orderdetailstate not in (100,110,0) AND AreaID LIKE '15%' GROUP BY HospitalID) A LEFT JOIN (SELECT abs(sum(WareHouseCount)) ReturnhouseCountTotal,abs(sum(WarehouseAmount)) ReturnhouseAmountTotal,HospitalID FROM View_Supervise WHERE 1=1 and PurchaseCount<0 AND (OrderStatus ='1' and Orderdetailstate not in (100,110,0) and AreaID LIKE '15%') GROUP BY HospitalID) C ON C.HospitalID = A.HospitalID LEFT JOIN (SELECT abs(sum(PurchaseCount)) CanclePurchaseCount,
abs(sum(PurchaseAmount)) CanclePurchaseAmount,
HospitalID
FROM View_Supervise_tb
WHERE 1 = 1
and Orderdetailstate = 4
GROUP BY HospitalID) D
ON D.HospitalID = A.HospitalID
LEFT JOIN (SELECT abs(sum(SettleCount)) WebMiningCountTotal,
abs(sum(SettleCount * Price)) WebMiningAmountTotal,
HospitalID
FROM View_Supervise_tb
WHERE 1 = 1
and Orderdetailstate in (160, 170)
GROUP BY HospitalID) E
ON E.HospitalID = A.HospitalID
LEFT JOIN (SELECT abs(sum(SettleCount)) InvoiceCountTotal,
abs(sum(SettleCount * Price)) InvoiceAmountTotal,
HospitalID
FROM view_invoicedistribution
WHERE 1 = 1
and auditstatus = 1
GROUP BY HospitalID) F
ON F.HospitalID = A.HospitalID
LEFT JOIN (SELECT abs(sum(SettleCount)) SettlementCountTotal,
abs(sum(SettleCount * Price)) SettlementAmountTotal,
HospitalID
FROM View_Supervise_tb
WHERE 1 = 1
and Orderdetailstate = 170
GROUP BY HospitalID) G
ON G.HospitalID = A.HospitalID) B ON View_HospitalArea.HospitalID = B.HospitalID where 1=1 AND AreaID LIKE '15%' ORDER BY areaid ASC,hospitalid 求解怎么把这条语句的的分页去掉