DBA Data[Home] [Help]

APPS.ISC_MAINT_LAB_BLG_RPT_PKG SQL Statements

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

Line: 35

     return '(select
    	grp_id,'||
    case l_view_by
	        when isc_maint_rpt_util_pkg.G_DEPARTMENT then 'decode(department_id,-1,-1,organization_id) organization_id'
	        when isc_maint_rpt_util_pkg.G_RESOURCE then 'decode(resource_id,-1,-1,organization_id) organization_id'
	        else 'organization_id'
	      end ||'
	    ,user_defined_status_id /* system and user defined status id */
	    ,organization_id organization_id_c
	    ,to_char(department_id) department_id
            ,to_char(resource_id) resource_id
            ,to_char(resource_id)||''-''||to_char(department_id)||''-''||to_char(organization_id) resource_id_c
	    ,decode(department_id,-1,''-1'',department_id||''-1'') department_id_c
	    ,hours_required
            ,hours_charged
	    from isc_maint_002_mv fact' || '
     	      where fact.grp_id = &ISC_GRP_ID ' ||
	       case
	       when l_org_id is null then
	        '
	       and ' || isc_maint_rpt_util_pkg.get_sec_where_clause( 'fact', l_org_id )
	       end || '
	      )';
Line: 60

            return '(select
                 fact.organization_id            organization_id_c
                ,fact.organization_id            organization_id
                ,to_char(fact.department_id)     department_id
           	,decode(fact.department_id,-1,''-1'',fact.department_id||''-1'') department_id_c
                ,fact.resource_id       resource_id
                ,to_char(resource_id) ||''-''|| to_char(fact.department_id)||''-''||
                  to_char(fact.organization_id)    resource_id_c
                ,fact.user_defined_Status_id       user_defined_status_id /* system and user defined status id */
                ,fact.operation_seq_number  operation_seq_number
                ,fact.op_start_date        op_start_date
                ,fact.op_end_date          op_end_date
                ,fact.hours_required    hours_required
                ,fact.hours_charged     hours_charged
                ,fact.work_order_name   work_order_name
		,fact.work_order_id	work_order_id
                ,(fact.hours_required - fact.hours_charged ) hours_backlog
                from
                isc_maint_lab_blg_f     fact where 1=1 ' ||
                case
                when l_org_id is null then
                'and ' || isc_maint_rpt_util_pkg.get_sec_where_clause( 'fact', l_org_id )
                end || '
                ) ';
Line: 117

  l_viewby_select varchar2(200);
Line: 139

	  , x_viewby_select    => l_viewby_select
	  , x_join_tbl         => l_join_tbl
	  , x_dim_bmap         => l_dim_bmap
	  , x_comparison_type  => l_comparison_type
	  , x_xtd              => l_xtd
	  );
Line: 172

     l_stmt := ' select ' || l_viewby_select ||',
      biv_measure1,
      biv_measure2,
      biv_measure3,
      biv_measure4,
      biv_measure5,
      biv_measure6,
      biv_attribute1 ';
Line: 191

l_inner_query := 'from ( select iset.*,  row_number() over(&ORDER_BY_CLAUSE nulls last )-1 rnk'||
                 ' from ( select c_hours_required BIV_MEASURE1, '||
                 ' c_hours_charged BIV_MEASURE2, ' ||
                 isc_maint_rpt_util_pkg.change_column('c_hours_required','c_hours_charged','BIV_MEASURE3','X') ||
                ', c_hours_required_total BIV_MEASURE4 , c_hours_charged_total BIV_MEASURE5 ,' ||
                 isc_maint_rpt_util_pkg.change_column('c_hours_required_total','c_hours_charged_total','BIV_MEASURE6','X')
                 ||l_drill_across ||','
                 ||isc_maint_rpt_util_pkg.get_inner_select_col(l_join_tbl)||' from ';
Line: 244

    l_viewby_select varchar2(200);
Line: 267

	  , x_viewby_select    => l_viewby_select
	  , x_join_tbl         => l_join_tbl
	  , x_dim_bmap         => l_dim_bmap
	  , x_comparison_type  => l_comparison_type
	  , x_xtd              => l_xtd
	  );
Line: 393

    l_stmt := 'select
		' || isc_maint_rpt_util_pkg.get_detail_column
		    (l_detail_col_tbl,'resource_id','BIV_MEASURE1') || '
		, ' || isc_maint_rpt_util_pkg.get_detail_column
		    (l_detail_col_tbl,'department_id','BIV_MEASURE2') || '
		, oset.WORK_ORDER_NAME            BIV_MEASURE3
		, oset.OPERATION_SEQ_NUMBER	  BIV_MEASURE4
		, oset.OP_START_DATE		  BIV_MEASURE5
		, oset.OP_END_DATE		  BIV_MEASURE6
		, oset.hours_required		  BIV_MEASURE7
		, oset.hours_charged		  BIV_MEASURE8
		, oset.hours_backlog		  BIV_MEASURE9
		, oset.hours_required_total	  BIV_MEASURE10
		, oset.hours_charged_total        BIV_MEASURE11 , '||
		 isc_maint_rpt_util_pkg.change_column('oset.hours_required_total','oset.hours_charged_total'
		                                    ,'BIV_MEASURE12','X') ||' , ' ||
		 isc_maint_rpt_util_pkg.get_drill_detail('BIV_ATTRIBUTE1') ||
        ' from
		' || isc_maint_rpt_util_pkg.detail_sql
		    ( p_detail_col_tbl => l_detail_col_tbl
		    , p_dimension_tbl  => l_dimension_tbl
		    , p_mv_name        => l_mv
		    , p_where_clause   => l_where_clause
		    , p_rank_order     => l_rank_order
		    , p_override_date_clause => '1 = 1 '
		    );