当Manager的B_Allocation值不明显时,我想对不同的值求和。例如,对于Manager 5,我希望能够总计10800,661782.60,2141987.20和2163743.43。对于像B_Allocation不同的6,8和14这样的经理人,我希望下面显示的值(Original Image)
select
BU.BuCode
, PE.ManagerID
, BUA.AllocatedAmount as B_Allocation
, PE.AllocatedAmount
from CFMS_ProjectEntry PE
join CFMS_BUAllocation BUA on BUA.BUDGETENTRYID = PE.BUDGETENTRYID
join CFMS_BU BU on BU.BUID = BUA.BUID
join CFMS_User US on US.UserID = PE.ManagerID
where BUCODE = 42406016
group by BU.BUCode
, ManagerID
, BUA.AllocatedAmount
, PE.AllocatedAmount
我想要的(Original Image):
+ -------- + --------- + ------------ + --------------- +
| BUCode | ManagerID | B_Allocation | AllocatedAmount |
+ -------- + --------- + ------------ + --------------- +
| 42406016 | 5 | 10800.00 | 1293916.30 |
| 42406016 | 5 | 661782.60 | 1723699.70 |
| 42406016 | 5 | 2141987.20 | 4628466.40 |
| 42406016 | 5 | 2163743.43 | 109956.12 |
| 42406016 | 5 | 2163743.43 | 407655.00 |
| 42406016 | 5 | 2163743.43 | 499902.00 |
| 42406016 | 5 | 2163743.43 | 523275.55 |
| 42406016 | 5 | 2163743.43 | 622954.76 |
| 42406016 | 6 | 4747880.45 | 1500000.00 |
| 42406016 | 6 | 4747880.45 | 2000000.00 |
| 42406016 | 8 | 726893.75 | 14142.71 |
| 42406016 | 8 | 726893.75 | 22143.56 |
| 42406016 | 8 | 726893.75 | 106448.50 |
| 42406016 | 8 | 726893.75 | 265501.45 |
| 42406016 | 8 | 726893.75 | 318657.53 |
| 42406016 | 14 | 4747880.45 | 747880.45 |
+ -------- + --------- + ------------ + --------------- +
答案 0 :(得分:0)
试试这个:
$nextpage = $paged + 1;
echo "<button id='btn1' value=$nextpage>Load even more </button>";