TRN_APR_DEP_VW(SQL View) |
Index Back |
---|---|
Training Simulation ViewTraining Simulation View |
SELECT A.BUDGET_PERIOD, A.BUSINESS_UNIT, A.DEMAND_ID, A.DEPTID, SUM(A.DEMAND_APPROVED), MAX(B.TOTAL_DEMAND), MAX(D.DEPT_DEMAND), MAX(B.TOTAL_DEMAND) - SUM(A.DEMAND_APPROVED) FROM PS_TRN_SIMULATION A, PS_TRN_DEMAND B, PS_TRN_SCENARIO C, PS_TRN_DEMAND_DEPT D WHERE A.BUDGET_PERIOD = B.BUDGET_PERIOD AND A.DEMAND_ID = B.DEMAND_ID AND A.BUDGET_PERIOD = C.BUDGET_PERIOD AND A.DEPTID = C.DEPTID AND A.SCENARIO = C.SCENARIO AND C.SCENARIO_STATUS = 'A' AND A.BUDGET_PERIOD = D.BUDGET_PERIOD AND A.DEMAND_ID = D.DEMAND_ID AND A.DEPTID = D.DEPTID AND A.BUSINESS_UNIT = B.BUSINESS_UNIT AND A.BUSINESS_UNIT = C.BUSINESS_UNIT AND A.BUSINESS_UNIT = D.BUSINESS_UNIT GROUP BY A.BUDGET_PERIOD, A.BUSINESS_UNIT, A.DEMAND_ID, A.DEPTID |
# | PeopleSoft Field Name | PeopleSoft Field Type | Database Column Type | Description |
---|---|---|---|---|
1 | BUDGET_PERIOD | Character(10) | VARCHAR2(10) NOT NULL |
Budget Period
Prompt Table: BUDGET_PERIOD |
2 | BUSINESS_UNIT | Character(5) | VARCHAR2(5) NOT NULL |
Business Unit
Prompt Table: BUDGET_BUS_UNIT |
3 | DEMAND_ID | Character(10) | VARCHAR2(10) NOT NULL |
Demand ID
Prompt Table: TRN_DEMAND |
4 | DEPTID | Character(10) | VARCHAR2(10) NOT NULL |
Department
Prompt Table: DEPT_TBL |
5 | DEMAND_APPROVED | Number(6,0) | INTEGER NOT NULL | Employees Approved |
6 | TOTAL_DEMAND | Number(6,0) | INTEGER NOT NULL | Total General Demand |
7 | DEPT_DEMAND | Number(6,0) | INTEGER NOT NULL | Department Demand |
8 | TOTAL_IGNORED | Signed Number(7,0) | DECIMAL(6) NOT NULL | Employees Ignored |