61: )' ;
62:
63: elsif p_report_type = 'TRAVEL_TASK_DETAIL' then
64:
65: if isc_fs_rpt_util_pkg.get_parameter_id
66: ( p_param
67: , isc_fs_rpt_util_pkg.G_DISTRICT
68: ) like '%.%' then
69: return ' (
63: elsif p_report_type = 'TRAVEL_TASK_DETAIL' then
64:
65: if isc_fs_rpt_util_pkg.get_parameter_id
66: ( p_param
67: , isc_fs_rpt_util_pkg.G_DISTRICT
68: ) like '%.%' then
69: return ' (
70: select
71: t.task_id
195: , x_custom_output out nocopy bis_query_attributes_tbl
196: )
197: is
198:
199: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
200: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
201: l_dim_bmap number;
202: l_comparison_type varchar2(200);
203: l_xtd varchar2(200);
223:
224: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
225: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
226:
227: isc_fs_rpt_util_pkg.register_dimension_levels
228: ( l_dimension_tbl
229: , l_dim_filter_map
230: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
231: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
226:
227: isc_fs_rpt_util_pkg.register_dimension_levels
228: ( l_dimension_tbl
229: , l_dim_filter_map
230: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
231: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
232: );
233:
234: isc_fs_rpt_util_pkg.process_parameters
227: isc_fs_rpt_util_pkg.register_dimension_levels
228: ( l_dimension_tbl
229: , l_dim_filter_map
230: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
231: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
232: );
233:
234: isc_fs_rpt_util_pkg.process_parameters
235: ( p_param => p_param
230: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
231: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
232: );
233:
234: isc_fs_rpt_util_pkg.process_parameters
235: ( p_param => p_param
236: , p_dimension_tbl => l_dimension_tbl
237: , p_dim_filter_map => l_dim_filter_map
238: , p_trend => 'N'
288: , p_prior_code => poa_dbi_util_pkg.both_priors
289: , p_to_date_type => l_to_date_type
290: );
291:
292: l_view_by := isc_fs_rpt_util_pkg.get_parameter_value
293: ( p_param
294: , 'VIEW_BY'
295: );
296:
319: , ISC_MEASURE_12 ISC_MEASURE_17
320: , ISC_MEASURE_18 ISC_MEASURE_18
321: , ISC_MEASURE_13 ISC_MEASURE_19
322: , ISC_MEASURE_14 ISC_MEASURE_20
323: , ' || isc_fs_rpt_util_pkg.get_district_drill_down
324: ( l_view_by
325: , g_task_rep_func
326: , 'ISC_ATTRIBUTE_4'
327: ) || '
325: , g_task_rep_func
326: , 'ISC_ATTRIBUTE_4'
327: ) || '
328: from ( select
329: row_number() over(&ORDER_BY_CLAUSE nulls last, ' || isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
330: , iset.*
331: from ( select * from (
332: select
333: record_type
332: select
333: record_type
334: , district_id
335: , district_id_c
336: , ' || isc_fs_rpt_util_pkg.rate_column
337: ( 'c_tot_trv_dur_min'
338: , 'c_count_dur_task'
339: , 'ISC_MEASURE_1'
340: , 'N'
338: , 'c_count_dur_task'
339: , 'ISC_MEASURE_1'
340: , 'N'
341: ) || '
342: , ' || isc_fs_rpt_util_pkg.rate_column
343: ( 'p_tot_trv_dur_min'
344: , 'p_count_dur_task'
345: , 'ISC_MEASURE_5'
346: , 'N'
344: , 'p_count_dur_task'
345: , 'ISC_MEASURE_5'
346: , 'N'
347: ) || '
348: , ' || isc_fs_rpt_util_pkg.change_column
349: ( isc_fs_rpt_util_pkg.rate_column
350: ( 'c_tot_trv_dur_min'
351: , 'c_count_dur_task'
352: , null
345: , 'ISC_MEASURE_5'
346: , 'N'
347: ) || '
348: , ' || isc_fs_rpt_util_pkg.change_column
349: ( isc_fs_rpt_util_pkg.rate_column
350: ( 'c_tot_trv_dur_min'
351: , 'c_count_dur_task'
352: , null
353: , 'N'
351: , 'c_count_dur_task'
352: , null
353: , 'N'
354: )
355: , isc_fs_rpt_util_pkg.rate_column
356: ( 'p_tot_trv_dur_min'
357: , 'p_count_dur_task'
358: , null
359: , 'N'
360: )
361: , 'ISC_MEASURE_2'
362: , 'N'
363: ) || '
364: , ' || isc_fs_rpt_util_pkg.rate_column
365: ( 'c_tot_trv_dist'
366: , 'c_count_dist_task'
367: , 'ISC_MEASURE_3'
368: , 'N'
366: , 'c_count_dist_task'
367: , 'ISC_MEASURE_3'
368: , 'N'
369: ) || '
370: , ' || isc_fs_rpt_util_pkg.rate_column
371: ( 'p_tot_trv_dist'
372: , 'p_count_dist_task'
373: , 'ISC_MEASURE_8'
374: , 'N'
372: , 'p_count_dist_task'
373: , 'ISC_MEASURE_8'
374: , 'N'
375: ) || '
376: , ' || isc_fs_rpt_util_pkg.change_column
377: ( isc_fs_rpt_util_pkg.rate_column
378: ( 'c_tot_trv_dist'
379: , 'c_count_dist_task'
380: , null
373: , 'ISC_MEASURE_8'
374: , 'N'
375: ) || '
376: , ' || isc_fs_rpt_util_pkg.change_column
377: ( isc_fs_rpt_util_pkg.rate_column
378: ( 'c_tot_trv_dist'
379: , 'c_count_dist_task'
380: , null
381: , 'N'
379: , 'c_count_dist_task'
380: , null
381: , 'N'
382: )
383: , isc_fs_rpt_util_pkg.rate_column
384: ( 'p_tot_trv_dist'
385: , 'p_count_dist_task'
386: , null
387: , 'N'
388: )
389: , 'ISC_MEASURE_4'
390: , 'N'
391: ) || '
392: , ' || isc_fs_rpt_util_pkg.rate_column
393: ( 'c_tot_trv_dur_min_total'
394: , 'c_count_dur_task_total'
395: , 'ISC_MEASURE_11'
396: , 'N'
394: , 'c_count_dur_task_total'
395: , 'ISC_MEASURE_11'
396: , 'N'
397: ) || '
398: , ' || isc_fs_rpt_util_pkg.change_column
399: ( isc_fs_rpt_util_pkg.rate_column
400: ( 'c_tot_trv_dur_min_total'
401: , 'c_count_dur_task_total'
402: , null
395: , 'ISC_MEASURE_11'
396: , 'N'
397: ) || '
398: , ' || isc_fs_rpt_util_pkg.change_column
399: ( isc_fs_rpt_util_pkg.rate_column
400: ( 'c_tot_trv_dur_min_total'
401: , 'c_count_dur_task_total'
402: , null
403: , 'N'
401: , 'c_count_dur_task_total'
402: , null
403: , 'N'
404: )
405: , isc_fs_rpt_util_pkg.rate_column
406: ( 'p_tot_trv_dur_min_total'
407: , 'p_count_dur_task_total'
408: , null
409: , 'N'
410: )
411: , 'ISC_MEASURE_12'
412: , 'N'
413: ) || '
414: , ' || isc_fs_rpt_util_pkg.rate_column
415: ( 'c_tot_trv_dist_total'
416: , 'c_count_dist_task_total'
417: , 'ISC_MEASURE_13'
418: , 'N'
416: , 'c_count_dist_task_total'
417: , 'ISC_MEASURE_13'
418: , 'N'
419: ) ||'
420: , ' || isc_fs_rpt_util_pkg.change_column
421: ( isc_fs_rpt_util_pkg.rate_column
422: ( 'c_tot_trv_dist_total'
423: , 'c_count_dist_task_total'
424: , null
417: , 'ISC_MEASURE_13'
418: , 'N'
419: ) ||'
420: , ' || isc_fs_rpt_util_pkg.change_column
421: ( isc_fs_rpt_util_pkg.rate_column
422: ( 'c_tot_trv_dist_total'
423: , 'c_count_dist_task_total'
424: , null
425: , 'N'
423: , 'c_count_dist_task_total'
424: , null
425: , 'N'
426: )
427: , isc_fs_rpt_util_pkg.rate_column
428: ( 'p_tot_trv_dist_total'
429: , 'p_count_dist_task_total'
430: , null
431: , 'N'
446: , p_filter_where => '1=1 ) iset '
447: , p_generate_viewby => 'Y'
448: );
449:
450: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
451: poa_dbi_util_pkg.get_custom_rolling_binds
452: ( p_custom_output => l_custom_output
453: , p_xtd => l_xtd
454: );
452: ( p_custom_output => l_custom_output
453: , p_xtd => l_xtd
454: );
455:
456: isc_fs_rpt_util_pkg.enhance_time_join
457: ( p_query => l_stmt
458: , p_trend => 'N'
459: );
460:
471: , x_custom_output out nocopy bis_query_attributes_tbl
472: )
473: as
474:
475: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
476: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
477: l_custom_output bis_query_attributes_tbl;
478: l_curr_suffix varchar2(3);
479: l_where_clause varchar2(10000);
486: l_cost_element varchar2(200);
487: l_col_tbl poa_dbi_util_pkg.poa_dbi_col_tbl;
488: l_stmt varchar2(32767);
489: l_rank_order varchar2(200);
490: l_detail_col_tbl isc_fs_rpt_util_pkg.t_detail_column_tbl;
491: l_order_by varchar2(200);
492: l_asc_desc varchar2(100);
493: l_distance varchar2(100);
494:
496:
497: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
498: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
499:
500: isc_fs_rpt_util_pkg.register_dimension_levels
501: ( l_dimension_tbl
502: , l_dim_filter_map
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
499:
500: isc_fs_rpt_util_pkg.register_dimension_levels
501: ( l_dimension_tbl
502: , l_dim_filter_map
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
500: isc_fs_rpt_util_pkg.register_dimension_levels
501: ( l_dimension_tbl
502: , l_dim_filter_map
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
501: ( l_dimension_tbl
502: , l_dim_filter_map
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
509: );
502: , l_dim_filter_map
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
509: );
510:
503: , isc_fs_rpt_util_pkg.G_CUSTOMER, 'N'
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
509: );
510:
511: isc_fs_rpt_util_pkg.process_parameters
504: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
505: , isc_fs_rpt_util_pkg.G_TASK_TYPE, 'N'
506: , isc_fs_rpt_util_pkg.G_TASK_OWNER, 'N'
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
509: );
510:
511: isc_fs_rpt_util_pkg.process_parameters
512: ( p_param => p_param
507: , isc_fs_rpt_util_pkg.G_TASK_ADDRESS, 'N'
508: , isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE, 'N'
509: );
510:
511: isc_fs_rpt_util_pkg.process_parameters
512: ( p_param => p_param
513: , p_dimension_tbl => l_dimension_tbl
514: , p_dim_filter_map => l_dim_filter_map
515: , p_trend => 'D'
529: , p_param
530: , l_custom_output
531: );
532:
533: isc_fs_rpt_util_pkg.add_detail_column
534: ( p_detail_col_tbl => l_detail_col_tbl
535: , p_dimension_tbl => l_dimension_tbl
536: , p_fact_col_name => 'task_number'
537: , p_fact_col_total => 'N'
537: , p_fact_col_total => 'N'
538: , p_column_key => 'task_number'
539: );
540:
541: isc_fs_rpt_util_pkg.add_detail_column
542: ( p_detail_col_tbl => l_detail_col_tbl
543: , p_dimension_tbl => l_dimension_tbl
544: , p_fact_col_name => 'task_id'
545: , p_fact_col_total => 'N'
545: , p_fact_col_total => 'N'
546: , p_column_key => 'task_id'
547: );
548:
549: isc_fs_rpt_util_pkg.add_detail_column
550: ( p_detail_col_tbl => l_detail_col_tbl
551: , p_dimension_tbl => l_dimension_tbl
552: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
553: , p_column_key => 'task_type'
548:
549: isc_fs_rpt_util_pkg.add_detail_column
550: ( p_detail_col_tbl => l_detail_col_tbl
551: , p_dimension_tbl => l_dimension_tbl
552: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
553: , p_column_key => 'task_type'
554: );
555:
556: isc_fs_rpt_util_pkg.add_detail_column
552: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_TYPE
553: , p_column_key => 'task_type'
554: );
555:
556: isc_fs_rpt_util_pkg.add_detail_column
557: ( p_detail_col_tbl => l_detail_col_tbl
558: , p_dimension_tbl => l_dimension_tbl
559: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
560: , p_column_key => 'task_owner'
555:
556: isc_fs_rpt_util_pkg.add_detail_column
557: ( p_detail_col_tbl => l_detail_col_tbl
558: , p_dimension_tbl => l_dimension_tbl
559: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
560: , p_column_key => 'task_owner'
561: );
562:
563: isc_fs_rpt_util_pkg.add_detail_column
559: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_OWNER
560: , p_column_key => 'task_owner'
561: );
562:
563: isc_fs_rpt_util_pkg.add_detail_column
564: ( p_detail_col_tbl => l_detail_col_tbl
565: , p_dimension_tbl => l_dimension_tbl
566: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
567: , p_column_key => 'task_assignee'
562:
563: isc_fs_rpt_util_pkg.add_detail_column
564: ( p_detail_col_tbl => l_detail_col_tbl
565: , p_dimension_tbl => l_dimension_tbl
566: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
567: , p_column_key => 'task_assignee'
568: );
569:
570: isc_fs_rpt_util_pkg.add_detail_column
566: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ASSIGNEE
567: , p_column_key => 'task_assignee'
568: );
569:
570: isc_fs_rpt_util_pkg.add_detail_column
571: ( p_detail_col_tbl => l_detail_col_tbl
572: , p_dimension_tbl => l_dimension_tbl
573: , p_fact_col_name => 'sched_travel_duration_min'
574: , p_fact_col_total => 'N'
574: , p_fact_col_total => 'N'
575: , p_column_key => 'sched_travel_duration_min'
576: );
577:
578: isc_fs_rpt_util_pkg.add_detail_column
579: ( p_detail_col_tbl => l_detail_col_tbl
580: , p_dimension_tbl => l_dimension_tbl
581: , p_fact_col_name => 'actual_travel_duration_min'
582: , p_fact_col_total => 'N'
582: , p_fact_col_total => 'N'
583: , p_column_key => 'actual_travel_duration_min'
584: );
585:
586: isc_fs_rpt_util_pkg.add_detail_column
587: ( p_detail_col_tbl => l_detail_col_tbl
588: , p_dimension_tbl => l_dimension_tbl
589: , p_fact_col_name => 'travel_duration_var'
590: , p_fact_col_total => 'N'
590: , p_fact_col_total => 'N'
591: , p_column_key => 'travel_duration_var'
592: );
593:
594: isc_fs_rpt_util_pkg.add_detail_column
595: ( p_detail_col_tbl => l_detail_col_tbl
596: , p_dimension_tbl => l_dimension_tbl
597: , p_fact_col_name => 'sched_travel_distance'
598: , p_fact_col_total => 'N'
598: , p_fact_col_total => 'N'
599: , p_column_key => 'sched_travel_distance'
600: );
601:
602: isc_fs_rpt_util_pkg.add_detail_column
603: ( p_detail_col_tbl => l_detail_col_tbl
604: , p_dimension_tbl => l_dimension_tbl
605: , p_fact_col_name => 'actual_travel_distance'
606: , p_fact_col_total => 'N'
606: , p_fact_col_total => 'N'
607: , p_column_key => 'actual_travel_distance'
608: );
609:
610: isc_fs_rpt_util_pkg.add_detail_column
611: ( p_detail_col_tbl => l_detail_col_tbl
612: , p_dimension_tbl => l_dimension_tbl
613: , p_fact_col_name => 'travel_dist_var'
614: , p_fact_col_total => 'N'
614: , p_fact_col_total => 'N'
615: , p_column_key => 'travel_dist_var'
616: );
617:
618: isc_fs_rpt_util_pkg.add_detail_column
619: ( p_detail_col_tbl => l_detail_col_tbl
620: , p_dimension_tbl => l_dimension_tbl
621: , p_dimension_level => isc_fs_rpt_util_pkg.G_CUSTOMER
622: , p_column_key => 'customer'
617:
618: isc_fs_rpt_util_pkg.add_detail_column
619: ( p_detail_col_tbl => l_detail_col_tbl
620: , p_dimension_tbl => l_dimension_tbl
621: , p_dimension_level => isc_fs_rpt_util_pkg.G_CUSTOMER
622: , p_column_key => 'customer'
623: );
624:
625: isc_fs_rpt_util_pkg.add_detail_column
621: , p_dimension_level => isc_fs_rpt_util_pkg.G_CUSTOMER
622: , p_column_key => 'customer'
623: );
624:
625: isc_fs_rpt_util_pkg.add_detail_column
626: ( p_detail_col_tbl => l_detail_col_tbl
627: , p_dimension_tbl => l_dimension_tbl
628: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ADDRESS
629: , p_column_key => 'address'
624:
625: isc_fs_rpt_util_pkg.add_detail_column
626: ( p_detail_col_tbl => l_detail_col_tbl
627: , p_dimension_tbl => l_dimension_tbl
628: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ADDRESS
629: , p_column_key => 'address'
630: );
631:
632: l_order_by := isc_fs_rpt_util_pkg.get_parameter_value
628: , p_dimension_level => isc_fs_rpt_util_pkg.G_TASK_ADDRESS
629: , p_column_key => 'address'
630: );
631:
632: l_order_by := isc_fs_rpt_util_pkg.get_parameter_value
633: ( p_param
634: , 'ORDERBY'
635: );
636:
659: 'nulls last, task_number';
660:
661: l_stmt := 'select
662: oset.task_number ISC_ATTRIBUTE_1
663: , ' || isc_fs_rpt_util_pkg.get_detail_column
664: ( l_detail_col_tbl
665: , 'task_type'
666: , 'ISC_ATTRIBUTE_2'
667: ) || '
664: ( l_detail_col_tbl
665: , 'task_type'
666: , 'ISC_ATTRIBUTE_2'
667: ) || '
668: , ' || isc_fs_rpt_util_pkg.get_detail_column
669: ( l_detail_col_tbl
670: , 'task_owner'
671: , 'ISC_ATTRIBUTE_3'
672: ) || '
669: ( l_detail_col_tbl
670: , 'task_owner'
671: , 'ISC_ATTRIBUTE_3'
672: ) || '
673: , ' || isc_fs_rpt_util_pkg.get_detail_column
674: ( l_detail_col_tbl
675: , 'task_assignee'
676: , 'ISC_ATTRIBUTE_4'
677: ) || '
680: , oset.travel_duration_var ISC_MEASURE_3
681: , oset.sched_travel_distance ISC_MEASURE_4
682: , oset.actual_travel_distance ISC_MEASURE_5
683: , oset.travel_dist_var ISC_MEASURE_6
684: , ' || isc_fs_rpt_util_pkg.get_detail_column
685: ( l_detail_col_tbl
686: , 'customer'
687: , 'ISC_ATTRIBUTE_6'
688: ) || '
685: ( l_detail_col_tbl
686: , 'customer'
687: , 'ISC_ATTRIBUTE_6'
688: ) || '
689: , ' || isc_fs_rpt_util_pkg.get_detail_column
690: ( l_detail_col_tbl
691: , 'address'
692: , 'ISC_ATTRIBUTE_7'
693: ) || '
690: ( l_detail_col_tbl
691: , 'address'
692: , 'ISC_ATTRIBUTE_7'
693: ) || '
694: , ' || isc_fs_rpt_util_pkg.get_task_detail_page_function
695: ( 'oset.task_id' ) || ' ISC_ATTRIBUTE_8
696: from
697: ' || isc_fs_rpt_util_pkg.detail_sql
698: ( p_detail_col_tbl => l_detail_col_tbl
693: ) || '
694: , ' || isc_fs_rpt_util_pkg.get_task_detail_page_function
695: ( 'oset.task_id' ) || ' ISC_ATTRIBUTE_8
696: from
697: ' || isc_fs_rpt_util_pkg.detail_sql
698: ( p_detail_col_tbl => l_detail_col_tbl
699: , p_dimension_tbl => l_dimension_tbl
700: , p_mv_name => l_mv
701: , p_where_clause => l_where_clause
709: ' travel_dist_var >= &ISC_FS_LOW3 and' ||
710: ' travel_dist_var < &ISC_FS_HIGH3 '
711: );
712:
713: isc_fs_rpt_util_pkg.bind_low_high
714: ( p_param
715: , isc_fs_rpt_util_pkg.G_TRVL_TIME_DISTRIB
716: , 'BIV_FS_TRVL_TIME'
717: , l_custom_output
711: );
712:
713: isc_fs_rpt_util_pkg.bind_low_high
714: ( p_param
715: , isc_fs_rpt_util_pkg.G_TRVL_TIME_DISTRIB
716: , 'BIV_FS_TRVL_TIME'
717: , l_custom_output
718: );
719:
716: , 'BIV_FS_TRVL_TIME'
717: , l_custom_output
718: );
719:
720: isc_fs_rpt_util_pkg.bind_low_high
721: ( p_param
722: , isc_fs_rpt_util_pkg.G_TRVL_DIST_DISTRIB
723: , 'BIV_FS_TRVL_DIST'
724: , l_custom_output
718: );
719:
720: isc_fs_rpt_util_pkg.bind_low_high
721: ( p_param
722: , isc_fs_rpt_util_pkg.G_TRVL_DIST_DISTRIB
723: , 'BIV_FS_TRVL_DIST'
724: , l_custom_output
725: , '&ISC_FS_LOW1'
726: , '&ISC_FS_HIGH1'
726: , '&ISC_FS_HIGH1'
727: );
728:
729:
730: isc_fs_rpt_util_pkg.bind_low_high
731: ( p_param
732: , isc_fs_rpt_util_pkg.G_TRVL_TIME_VAR_DISTRIB
733: , 'BIV_FS_TRVL_TIME_VAR'
734: , l_custom_output
728:
729:
730: isc_fs_rpt_util_pkg.bind_low_high
731: ( p_param
732: , isc_fs_rpt_util_pkg.G_TRVL_TIME_VAR_DISTRIB
733: , 'BIV_FS_TRVL_TIME_VAR'
734: , l_custom_output
735: , '&ISC_FS_LOW2'
736: , '&ISC_FS_HIGH2'
735: , '&ISC_FS_LOW2'
736: , '&ISC_FS_HIGH2'
737: );
738:
739: isc_fs_rpt_util_pkg.bind_low_high
740: ( p_param
741: , isc_fs_rpt_util_pkg.G_TRVL_DIST_VAR_DISTRIB
742: , 'BIV_FS_TRVL_DIST_VAR'
743: , l_custom_output
737: );
738:
739: isc_fs_rpt_util_pkg.bind_low_high
740: ( p_param
741: , isc_fs_rpt_util_pkg.G_TRVL_DIST_VAR_DISTRIB
742: , 'BIV_FS_TRVL_DIST_VAR'
743: , l_custom_output
744: , '&ISC_FS_LOW3'
745: , '&ISC_FS_HIGH3'
745: , '&ISC_FS_HIGH3'
746: );
747:
748: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
749: --l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
750: isc_fs_rpt_util_pkg.enhance_time_join
751: ( p_query => l_stmt
752: , p_trend => 'N'
753: );
746: );
747:
748: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
749: --l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
750: isc_fs_rpt_util_pkg.enhance_time_join
751: ( p_query => l_stmt
752: , p_trend => 'N'
753: );
754:
764: , x_custom_output out nocopy bis_query_attributes_tbl
765: )
766: is
767:
768: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
769: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
770: l_custom_output bis_query_attributes_tbl;
771: l_curr_suffix varchar2(3);
772: l_where_clause varchar2(10000);
786:
787: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
788: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
789:
790: isc_fs_rpt_util_pkg.register_dimension_levels
791: ( l_dimension_tbl
792: , l_dim_filter_map
793: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
794: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
789:
790: isc_fs_rpt_util_pkg.register_dimension_levels
791: ( l_dimension_tbl
792: , l_dim_filter_map
793: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
794: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
795: );
796:
797: isc_fs_rpt_util_pkg.process_parameters
790: isc_fs_rpt_util_pkg.register_dimension_levels
791: ( l_dimension_tbl
792: , l_dim_filter_map
793: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
794: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
795: );
796:
797: isc_fs_rpt_util_pkg.process_parameters
798: ( p_param => p_param
793: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
794: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
795: );
796:
797: isc_fs_rpt_util_pkg.process_parameters
798: ( p_param => p_param
799: , p_dimension_tbl => l_dimension_tbl
800: , p_dim_filter_map => l_dim_filter_map
801: , p_trend => 'N'
859: );
860:
861: l_stmt := 'select
862: cal.name VIEWBY ' ||
863: isc_fs_rpt_util_pkg.get_trend_drill
864: ( l_xtd
865: , g_trd_rep_func
866: , 'ISC_ATTRIBUTE_3'
867: , 'ISC_ATTRIBUTE_4'
865: , g_trd_rep_func
866: , 'ISC_ATTRIBUTE_3'
867: , 'ISC_ATTRIBUTE_4'
868: ) || '
869: , ' || isc_fs_rpt_util_pkg.rate_column
870: ( 'c_tot_trv_dur_min'
871: , 'c_count_dur_task'
872: , 'ISC_MEASURE_2'
873: , 'N'
871: , 'c_count_dur_task'
872: , 'ISC_MEASURE_2'
873: , 'N'
874: ) || '
875: , ' || isc_fs_rpt_util_pkg.change_column
876: ( isc_fs_rpt_util_pkg.rate_column
877: ( 'c_tot_trv_dur_min'
878: , 'c_count_dur_task'
879: , NULL
872: , 'ISC_MEASURE_2'
873: , 'N'
874: ) || '
875: , ' || isc_fs_rpt_util_pkg.change_column
876: ( isc_fs_rpt_util_pkg.rate_column
877: ( 'c_tot_trv_dur_min'
878: , 'c_count_dur_task'
879: , NULL
880: , 'N'
878: , 'c_count_dur_task'
879: , NULL
880: , 'N'
881: )
882: , isc_fs_rpt_util_pkg.rate_column
883: ( 'p_tot_trv_dur_min'
884: , 'p_count_dur_task'
885: , NULL
886: , 'N'
887: )
888: , 'ISC_MEASURE_3'
889: , 'N'
890: ) || '
891: , ' || isc_fs_rpt_util_pkg.rate_column
892: ( 'c_tot_trv_dist'
893: , 'c_count_dist_task'
894: , NULL
895: , 'N'
893: , 'c_count_dist_task'
894: , NULL
895: , 'N'
896: ) || ' ISC_MEASURE_5
897: , ' || isc_fs_rpt_util_pkg.change_column
898: ( isc_fs_rpt_util_pkg.rate_column
899: ( 'c_tot_trv_dist'
900: , 'c_count_dist_task'
901: , NULL
894: , NULL
895: , 'N'
896: ) || ' ISC_MEASURE_5
897: , ' || isc_fs_rpt_util_pkg.change_column
898: ( isc_fs_rpt_util_pkg.rate_column
899: ( 'c_tot_trv_dist'
900: , 'c_count_dist_task'
901: , NULL
902: , 'N'
900: , 'c_count_dist_task'
901: , NULL
902: , 'N'
903: )
904: , isc_fs_rpt_util_pkg.rate_column
905: ( 'p_tot_trv_dist'
906: , 'p_count_dist_task'
907: , NULL
908: , 'N'
919: , p_use_grpid => 'N'
920: );
921:
922: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
923: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
924:
925: isc_fs_rpt_util_pkg.enhance_time_join
926: ( p_query => l_stmt
927: , p_trend => 'Y'
921:
922: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
923: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
924:
925: isc_fs_rpt_util_pkg.enhance_time_join
926: ( p_query => l_stmt
927: , p_trend => 'Y'
928: );
929:
959: , x_custom_output out nocopy bis_query_attributes_tbl
960: )
961: is
962:
963: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
964: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
965: l_custom_output bis_query_attributes_tbl;
966: l_curr_suffix varchar2(3);
967: l_where_clause varchar2(10000);
981:
982: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
983: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
984:
985: isc_fs_rpt_util_pkg.register_dimension_levels
986: ( l_dimension_tbl
987: , l_dim_filter_map
988: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
989: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
984:
985: isc_fs_rpt_util_pkg.register_dimension_levels
986: ( l_dimension_tbl
987: , l_dim_filter_map
988: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
989: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
990: );
991:
992: isc_fs_rpt_util_pkg.process_parameters
985: isc_fs_rpt_util_pkg.register_dimension_levels
986: ( l_dimension_tbl
987: , l_dim_filter_map
988: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
989: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
990: );
991:
992: isc_fs_rpt_util_pkg.process_parameters
993: ( p_param => p_param
988: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
989: -- , isc_fs_rpt_util_pkg.G_DISTANCE_UOM, 'Y'
990: );
991:
992: isc_fs_rpt_util_pkg.process_parameters
993: ( p_param => p_param
994: , p_dimension_tbl => l_dimension_tbl
995: , p_dim_filter_map => l_dim_filter_map
996: , p_trend => 'N'
1054: );
1055:
1056: l_stmt := 'select
1057: cal.name VIEWBY ' ||
1058: isc_fs_rpt_util_pkg.get_trend_drill
1059: ( l_xtd
1060: , g_tot_trd_rep_func
1061: , 'ISC_ATTRIBUTE_3'
1062: , 'ISC_ATTRIBUTE_4'
1060: , g_tot_trd_rep_func
1061: , 'ISC_ATTRIBUTE_3'
1062: , 'ISC_ATTRIBUTE_4'
1063: ) || '
1064: , ' || isc_fs_rpt_util_pkg.rate_column
1065: ( 'c_tot_trv_dur_min'
1066: , '60'
1067: , 'ISC_MEASURE_2'
1068: , 'N'
1066: , '60'
1067: , 'ISC_MEASURE_2'
1068: , 'N'
1069: ) || '
1070: , ' || isc_fs_rpt_util_pkg.change_column
1071: ( isc_fs_rpt_util_pkg.rate_column
1072: ( 'c_tot_trv_dur_min'
1073: , '60'
1074: , NULL
1067: , 'ISC_MEASURE_2'
1068: , 'N'
1069: ) || '
1070: , ' || isc_fs_rpt_util_pkg.change_column
1071: ( isc_fs_rpt_util_pkg.rate_column
1072: ( 'c_tot_trv_dur_min'
1073: , '60'
1074: , NULL
1075: , 'N'
1073: , '60'
1074: , NULL
1075: , 'N'
1076: )
1077: , isc_fs_rpt_util_pkg.rate_column
1078: ( 'p_tot_trv_dur_min'
1079: , '60'
1080: , NULL
1081: , 'N'
1083: , 'ISC_MEASURE_3'
1084: , 'N'
1085: ) || '
1086: , c_tot_trv_dist ISC_MEASURE_5
1087: , ' || isc_fs_rpt_util_pkg.change_column
1088: ( 'c_tot_trv_dist'
1089: , 'p_tot_trv_dist'
1090: , 'ISC_MEASURE_6'
1091: , 'N'
1099: , p_use_grpid => 'N'
1100: );
1101:
1102: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
1103: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
1104:
1105: isc_fs_rpt_util_pkg.enhance_time_join
1106: ( p_query => l_stmt
1107: , p_trend => 'Y'
1101:
1102: -- the next line can be used to dump the contents of the PMV parameters as comments into stmt
1103: -- l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
1104:
1105: isc_fs_rpt_util_pkg.enhance_time_join
1106: ( p_query => l_stmt
1107: , p_trend => 'Y'
1108: );
1109:
1139: , x_custom_output out nocopy bis_query_attributes_tbl
1140: )
1141: is
1142:
1143: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
1144: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
1145: l_custom_output bis_query_attributes_tbl;
1146: l_curr_suffix varchar2(3);
1147: l_where_clause varchar2(10000);
1164:
1165: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
1166: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
1167:
1168: isc_fs_rpt_util_pkg.register_dimension_levels
1169: ( l_dimension_tbl
1170: , l_dim_filter_map
1171: , isc_fs_rpt_util_pkg.G_DISTRICT , 'Y'
1172: );
1167:
1168: isc_fs_rpt_util_pkg.register_dimension_levels
1169: ( l_dimension_tbl
1170: , l_dim_filter_map
1171: , isc_fs_rpt_util_pkg.G_DISTRICT , 'Y'
1172: );
1173:
1174: isc_fs_rpt_util_pkg.process_parameters
1175: ( p_param => p_param
1170: , l_dim_filter_map
1171: , isc_fs_rpt_util_pkg.G_DISTRICT , 'Y'
1172: );
1173:
1174: isc_fs_rpt_util_pkg.process_parameters
1175: ( p_param => p_param
1176: , p_dimension_tbl => l_dimension_tbl
1177: , p_dim_filter_map => l_dim_filter_map
1178: , p_trend => 'N'
1221: , p_to_date_type => l_to_date_type
1222: , x_bucket_rec => l_bucket_rec
1223: );
1224:
1225: l_view_by := isc_fs_rpt_util_pkg.get_parameter_value
1226: ( p_param
1227: , 'VIEW_BY'
1228: );
1229:
1228: );
1229:
1230: l_stmt := 'select
1231: ' || l_viewby_select || '
1232: , ' || isc_fs_rpt_util_pkg.get_district_drill_down
1233: ( l_view_by
1234: , g_task_tim_dtr_func
1235: , 'ISC_ATTRIBUTE_2'
1236: ) || '
1233: ( l_view_by
1234: , g_task_tim_dtr_func
1235: , 'ISC_ATTRIBUTE_2'
1236: ) || '
1237: , ' || isc_fs_rpt_util_pkg.get_detail_drill_down
1238: ( p_view_by => l_view_by
1239: , p_function_name => g_task_tim_dtl_func
1240: , p_check_column_name => 'ISC_MEASURE_4'
1241: , p_column_alias => 'ISC_ATTRIBUTE_3'
1240: , p_check_column_name => 'ISC_MEASURE_4'
1241: , p_column_alias => 'ISC_ATTRIBUTE_3'
1242: , p_check_resource => 'Y'
1243: ) || '
1244: , ' || isc_fs_rpt_util_pkg.get_bucket_drill_down
1245: ( p_bucket_rec => l_bucket_rec
1246: , p_view_by => l_view_by
1247: , p_function_name => g_task_tim_dtl_func
1248: , p_check_column_name => 'ISC_MEASURE_5'
1273: , p_total_flag => 'N'
1274: ) || '
1275: from (
1276: select
1277: row_number() over(&ORDER_BY_CLAUSE nulls last, '|| isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
1278: ,iset.* from ( select * from (
1279: select
1280: record_type
1281: , district_id
1279: select
1280: record_type
1281: , district_id
1282: , district_id_c
1283: , ' || isc_fs_rpt_util_pkg.rate_column
1284: ( 'c_tot_trv_dur_min'
1285: , 'c_count_dur_task'
1286: , 'ISC_MEASURE_2'
1287: , 'N'
1285: , 'c_count_dur_task'
1286: , 'ISC_MEASURE_2'
1287: , 'N'
1288: ) || '
1289: , ' || isc_fs_rpt_util_pkg.change_column
1290: ( isc_fs_rpt_util_pkg.rate_column
1291: ( 'c_tot_trv_dur_min'
1292: , 'c_count_dur_task'
1293: , null
1286: , 'ISC_MEASURE_2'
1287: , 'N'
1288: ) || '
1289: , ' || isc_fs_rpt_util_pkg.change_column
1290: ( isc_fs_rpt_util_pkg.rate_column
1291: ( 'c_tot_trv_dur_min'
1292: , 'c_count_dur_task'
1293: , null
1294: , 'N'
1292: , 'c_count_dur_task'
1293: , null
1294: , 'N'
1295: )
1296: , isc_fs_rpt_util_pkg.rate_column
1297: ( 'p_tot_trv_dur_min'
1298: , 'p_count_dur_task'
1299: , null
1300: , 'N'
1310: , p_prefix => 'nvl(c_'
1311: , p_suffix => ',0)/abs(decode(c_count_dur_task,0,null,c_count_dur_task))*100'
1312: , p_total_flag => 'N'
1313: ) || '
1314: , ' || isc_fs_rpt_util_pkg.rate_column
1315: ( 'c_tot_trv_dur_min_total'
1316: , 'c_count_dur_task_total'
1317: , 'ISC_MEASURE_22'
1318: , 'N'
1316: , 'c_count_dur_task_total'
1317: , 'ISC_MEASURE_22'
1318: , 'N'
1319: ) || '
1320: , ' || isc_fs_rpt_util_pkg.change_column
1321: ( isc_fs_rpt_util_pkg.rate_column
1322: ( 'c_tot_trv_dur_min_total'
1323: , 'c_count_dur_task_total'
1324: , null
1317: , 'ISC_MEASURE_22'
1318: , 'N'
1319: ) || '
1320: , ' || isc_fs_rpt_util_pkg.change_column
1321: ( isc_fs_rpt_util_pkg.rate_column
1322: ( 'c_tot_trv_dur_min_total'
1323: , 'c_count_dur_task_total'
1324: , null
1325: , 'N'
1323: , 'c_count_dur_task_total'
1324: , null
1325: , 'N'
1326: )
1327: , isc_fs_rpt_util_pkg.rate_column
1328: ( 'p_tot_trv_dur_min_total'
1329: , 'p_count_dur_task_total'
1330: , null
1331: , 'N'
1353: , p_filter_where => 'isc_measure_4 <> 0 ) iset '
1354: , p_generate_viewby => 'Y'
1355: );
1356:
1357: --l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
1358:
1359: poa_dbi_util_pkg.get_custom_rolling_binds
1360: ( p_custom_output => l_custom_output
1361: , p_xtd => l_xtd
1360: ( p_custom_output => l_custom_output
1361: , p_xtd => l_xtd
1362: );
1363:
1364: isc_fs_rpt_util_pkg.enhance_time_join
1365: ( p_query => l_stmt
1366: , p_trend => 'N'
1367: );
1368:
1377: , x_custom_output out nocopy bis_query_attributes_tbl
1378: )
1379: is
1380:
1381: l_dimension_tbl isc_fs_rpt_util_pkg.t_dimension_tbl;
1382: l_dim_filter_map poa_dbi_util_pkg.poa_dbi_dim_map;
1383: l_custom_output bis_query_attributes_tbl;
1384: l_curr_suffix varchar2(3);
1385: l_where_clause varchar2(10000);
1403:
1404: l_col_tbl := poa_dbi_util_pkg.poa_dbi_col_tbl();
1405: l_join_tbl := poa_dbi_util_pkg.poa_dbi_join_tbl();
1406:
1407: isc_fs_rpt_util_pkg.register_dimension_levels
1408: ( l_dimension_tbl
1409: , l_dim_filter_map
1410: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
1411: );
1406:
1407: isc_fs_rpt_util_pkg.register_dimension_levels
1408: ( l_dimension_tbl
1409: , l_dim_filter_map
1410: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
1411: );
1412:
1413: isc_fs_rpt_util_pkg.process_parameters
1414: ( p_param => p_param
1409: , l_dim_filter_map
1410: , isc_fs_rpt_util_pkg.G_DISTRICT, 'Y'
1411: );
1412:
1413: isc_fs_rpt_util_pkg.process_parameters
1414: ( p_param => p_param
1415: , p_dimension_tbl => l_dimension_tbl
1416: , p_dim_filter_map => l_dim_filter_map
1417: , p_trend => 'N'
1461: , p_to_date_type => l_to_date_type
1462: , x_bucket_rec => l_bucket_rec
1463: );
1464:
1465: l_view_by := isc_fs_rpt_util_pkg.get_parameter_value
1466: ( p_param
1467: , 'VIEW_BY'
1468: );
1469:
1468: );
1469:
1470: l_stmt := 'select
1471: ' || l_viewby_select || '
1472: , ' || isc_fs_rpt_util_pkg.get_district_drill_down
1473: ( l_view_by
1474: , g_task_dis_dtr_func
1475: , 'ISC_ATTRIBUTE_2'
1476: ) || '
1473: ( l_view_by
1474: , g_task_dis_dtr_func
1475: , 'ISC_ATTRIBUTE_2'
1476: ) || '
1477: , ' || isc_fs_rpt_util_pkg.get_detail_drill_down
1478: ( p_view_by => l_view_by
1479: , p_function_name => g_task_tim_dtl_func
1480: , p_check_column_name => 'ISC_MEASURE_4'
1481: , p_column_alias => 'ISC_ATTRIBUTE_3'
1480: , p_check_column_name => 'ISC_MEASURE_4'
1481: , p_column_alias => 'ISC_ATTRIBUTE_3'
1482: , p_check_resource => 'Y'
1483: ) || '
1484: , ' || isc_fs_rpt_util_pkg.get_bucket_drill_down
1485: ( p_bucket_rec => l_bucket_rec
1486: , p_view_by => l_view_by
1487: , p_function_name => g_task_tim_dtl_func
1488: , p_check_column_name => 'ISC_MEASURE_5'
1513: , p_total_flag => 'N'
1514: ) || '
1515: from (
1516: select
1517: row_number() over(&ORDER_BY_CLAUSE nulls last , '|| isc_fs_rpt_util_pkg.get_inner_select_col(l_join_tbl) || ')-1 rnk
1518: ,iset.* from ( select * from (
1519: select
1520: record_type
1521: , district_id
1519: select
1520: record_type
1521: , district_id
1522: , district_id_c
1523: , ' || isc_fs_rpt_util_pkg.rate_column
1524: ( 'c_tot_trv_dist'
1525: , 'c_count_dist_task'
1526: , 'ISC_MEASURE_2'
1527: , 'N'
1525: , 'c_count_dist_task'
1526: , 'ISC_MEASURE_2'
1527: , 'N'
1528: ) || '
1529: , ' || isc_fs_rpt_util_pkg.change_column
1530: ( isc_fs_rpt_util_pkg.rate_column
1531: ( 'c_tot_trv_dist'
1532: , 'c_count_dist_task'
1533: , null
1526: , 'ISC_MEASURE_2'
1527: , 'N'
1528: ) || '
1529: , ' || isc_fs_rpt_util_pkg.change_column
1530: ( isc_fs_rpt_util_pkg.rate_column
1531: ( 'c_tot_trv_dist'
1532: , 'c_count_dist_task'
1533: , null
1534: , 'N'
1532: , 'c_count_dist_task'
1533: , null
1534: , 'N'
1535: )
1536: , isc_fs_rpt_util_pkg.rate_column
1537: ( 'p_tot_trv_dist'
1538: , 'p_count_dist_task'
1539: , null
1540: , 'N'
1550: , p_prefix => 'nvl(c_'
1551: , p_suffix => ',0)/abs(decode(c_count_dist_task,0,null,c_count_dist_task))*100'
1552: , p_total_flag => 'N'
1553: ) || '
1554: , ' || isc_fs_rpt_util_pkg.rate_column
1555: ( 'c_tot_trv_dist_total'
1556: , 'c_count_dist_task_total'
1557: , 'ISC_MEASURE_22'
1558: , 'N'
1556: , 'c_count_dist_task_total'
1557: , 'ISC_MEASURE_22'
1558: , 'N'
1559: ) || '
1560: , ' || isc_fs_rpt_util_pkg.change_column
1561: ( isc_fs_rpt_util_pkg.rate_column
1562: ( 'c_tot_trv_dist_total'
1563: , 'c_count_dist_task_total'
1564: , null
1557: , 'ISC_MEASURE_22'
1558: , 'N'
1559: ) || '
1560: , ' || isc_fs_rpt_util_pkg.change_column
1561: ( isc_fs_rpt_util_pkg.rate_column
1562: ( 'c_tot_trv_dist_total'
1563: , 'c_count_dist_task_total'
1564: , null
1565: , 'N'
1563: , 'c_count_dist_task_total'
1564: , null
1565: , 'N'
1566: )
1567: , isc_fs_rpt_util_pkg.rate_column
1568: ( 'p_tot_trv_dist_total'
1569: , 'p_count_dist_task_total'
1570: , null
1571: , 'N'
1593: , p_filter_where => 'isc_measure_4 <> 0 ) iset '
1594: , p_generate_viewby => 'Y'
1595: );
1596:
1597: --l_stmt := l_stmt || isc_fs_rpt_util_pkg.dump_parameters(p_param);
1598:
1599: poa_dbi_util_pkg.get_custom_rolling_binds
1600: ( p_custom_output => l_custom_output
1601: , p_xtd => l_xtd
1600: ( p_custom_output => l_custom_output
1601: , p_xtd => l_xtd
1602: );
1603:
1604: isc_fs_rpt_util_pkg.enhance_time_join
1605: ( p_query => l_stmt
1606: , p_trend => 'N'
1607: );
1608: