DBA Data[Home] [Help]

APPS.HRI_OLTP_PMV_WMV_SUP_GRAPH SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 51

        ' SELECT  -- Headcount Budget Trend
          a.period_as_of_date      VIEWBY,
          a.period_as_of_date      VIEWBYID,
          a.period_order           hri_p_order_by_1,
          a.period_as_of_date      hri_p_graph_x_label_time,
          SUM(decode(hri_dbi_wmv_budget.comp_date(a.period_as_of_date,trunc(&BIS_CURRENT_ASOF_DATE))
                , ''N'', b.total_headcount
                ,''Y'', null) )    hri_p_wmv_sum_mv,
          c.budget_value           hri_p_wmv_budget_sum_mv
     FROM '||l_trend_table || ' a,
         HRI_MDP_SUP_WRKFC_SUP_MV b,
         hri_dbi_wmv_budget_mv c
    WHERE b.supervisor_person_id = &HRI_PERSON+HRI_PER_USRDR_H
      AND a.period_as_of_date BETWEEN b.effective_start_date AND b.effective_end_date
      AND c.supervisor_id(+) = b.supervisor_person_id
      AND b.wkth_wktyp_sk_fk = ''EMP''
      AND NVL(c.effective_date,SYSDATE) = ( SELECT  NVL(MAX(e.effective_date),SYSDATE)
                                            FROM    hri_dbi_wmv_budget_mv e
                                            WHERE   e.supervisor_id = c.supervisor_id
                                            AND     e.effective_date <= a.period_as_of_date
                                            AND     e.count_type = ''TOTAL_WMV_BUDGET'')
      AND c.count_type(+) = ''TOTAL_WMV_BUDGET''
          '|| l_security_clause ||'
GROUP BY a.period_order
       , a.period_as_of_date
       , c.budget_value
ORDER BY a.period_order ASC' ;