Posted By

samborenus on 04/22/13


Tagged

pcb BUDGETVIEW


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

samborenus


BTH_BUDTRAN_CY


 / Published in: SQL
 

POSITION CONTROL BUDGETING

  1. SELECT P.GLACCOUNT, P.POSITION_NUMBER, P.GLYEAR, NOW() AS GLDATE, 'BO' AS TRANS_TYPE, 'ADOPTED' AS TRANS_SOURCE, P.TRANS_DESCRIPTION, P.BUDGET_TOTAL AS BUDGET_TOTAL,
  2. ROUND(P.BUDGET_TOTAL/12,2) AS MTH01, ROUND(P.BUDGET_TOTAL/12,2) AS MTH02, ROUND(P.BUDGET_TOTAL/12,2) AS MTH03,
  3. ROUND(P.BUDGET_TOTAL/12,2) AS MTH04, ROUND(P.BUDGET_TOTAL/12,2) AS MTH05, ROUND(P.BUDGET_TOTAL/12,2) AS MTH06,
  4. ROUND(P.BUDGET_TOTAL/12,2) AS MTH07, ROUND(P.BUDGET_TOTAL/12,2) AS MTH08, ROUND(P.BUDGET_TOTAL/12,2) AS MTH09,
  5. ROUND(P.BUDGET_TOTAL/12,2) AS MTH10, ROUND(P.BUDGET_TOTAL/12,2) AS MTH11, P.BUDGET_TOTAL-(11*ROUND(P.BUDGET_TOTAL/12,2)) AS MTH12, P.UNITS, P.UNIT_DESC, P.UNIT_AMOUNT, P.AMTDESC
  6. FROM NWS_PCBUDTRANS AS P
  7. WHERE P.FUND_PROGRAM IN ('1010.6220','1010.6210','1010.6230','1010.6240');
  8.  
  9. SELECT B.FUND, B.FUND_PROGRAM, B.BASE_DETAIL,
  10. SUBSTRING(B.BASE_DETAIL,1,4) AS BASE,
  11. B.GLACCOUNT,B.GLYEAR,B.TRANS_DESCRIPTION,B.UNITS,B.UNIT_DESC,B.UNIT_AMOUNT,B.AMTDESC,B.BUDGET_TOTAL,B.POSITION_NUMBER
  12. FROM BUDGETVIEW.BTH_BUDTRAN_CY B WHERE (B.CLASS1 = 'EX10')

Report this snippet  

You need to login to post a comment.