DBA Data[Home] [Help]

APPS.BIX_UWQ_TEMP_PKG SQL Statements

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

Line: 7

v_session_id NUMBER ;      -- this is used to insert the session id
Line: 71

   select fnd_profile.value('BIX_DM_DEFAULT_GROUP')
   into   v_default_group_id
   from dual;
Line: 84

      select grp.group_id
      into   v_default_group_id
      from   jtf_rs_group_members grp, jtf_rs_resource_extns res
      where  res.resource_id = grp.resource_id
      and    res.user_id = fnd_profile.value('USER_ID')
      and    grp.last_update_date = (select max(grp2.last_update_date)
                                     from jtf_rs_group_members grp2, jtf_rs_resource_extns res2
                                     where  res2.resource_id = grp2.resource_id
                                     and    res2.user_id = fnd_profile.value('USER_ID')
                                     );
Line: 131

select denorm.group_id GID
from   jtf_rs_groups_denorm denorm
where  denorm.parent_group_id = p_group_id
and    denorm.immediate_parent_flag = 'Y';
Line: 144

SELECT DISTINCT res.resource_id RID, res.source_name RNAME
FROM   jtf_rs_group_members grp, jtf_rs_resource_extns res
WHERE  grp.group_id = p_group_id
AND    grp.resource_id = res.resource_id;
Line: 152

v_session_id := icx_sec.g_session_id; -- this is used to insert the session id
Line: 154

delete from bix_dm_bin
where bin_code = 'BIX_UWQ_ACTIVITY_BIN'
and session_id = v_session_id;
Line: 160

select max(day)-1
into   v_max_date
from   bix_dm_uwq_agent_sum;
Line: 170

   select fnd_profile.value('BIX_DM_DEFAULT_GROUP')
   into   v_default_group_id
   from dual;
Line: 183

      select grp.group_id
      into   v_default_group_id
      from   jtf_rs_group_members grp, jtf_rs_resource_extns res
      where  res.resource_id = grp.resource_id
      and    res.user_id = fnd_profile.value('USER_ID')
      and    grp.last_update_date = (select max(grp2.last_update_date)
                                     from jtf_rs_group_members grp2, jtf_rs_resource_extns res2
                                     where  res.resource_id = grp.resource_id
                                     and    res.user_id = fnd_profile.value('USER_ID')
                                     );
Line: 214

   INSERT INTO bix_dm_bin (bin_code, col2, col3, col4, col5, col6, session_id)
   SELECT 'BIX_UWQ_ACTIVITY_BIN',
           rec_child_agents.RNAME,
          'A'||to_char(v_max_date,'DD-MON-YYYY')||rec_child_agents.RID,
           DAY_LOGIN,
          'A'||to_char(v_max_date,'DD-MON-YYYY')||rec_child_agents.RID,
          bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN)) ),
		v_session_id
   FROM   bix_dm_uwq_agent_sum summ
   WHERE  summ.resource_id = rec_child_agents.RID
   AND    summ.DAY         = trunc(v_max_date);
Line: 238

   INSERT INTO bix_dm_bin (bin_code, col2, col3, col4, col5, col6, session_id)
   SELECT 'BIX_UWQ_ACTIVITY_BIN',
          vl.group_name,
          'G'||to_char(v_max_date,'DD-MON-YYYY')||rec_child_groups.GID,
          DAY_LOGIN,
          'G'||to_char(v_max_date,'DD-MON-YYYY')||rec_child_groups.GID,
          bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN)) ),
		v_session_id
   FROM   bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE  summ.group_id      = rec_child_groups.GID
   AND    summ.group_id      = vl.group_id
   AND    summ.day           = trunc(v_max_date);
Line: 274

v_session_id := icx_sec.g_session_id; -- this is used to insert the session id
Line: 279

delete from bix_dm_report
where report_code = 'BIX_UWQ_LOGINS_RPT'
and session_id = v_session_id;
Line: 294

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', res.source_name, '',
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id = substr(v_context,13)
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;
Line: 312

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', vl.group_name, '',
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id = substr(v_context,13)
   AND     summ.group_id = vl.group_id
   AND     summ.day         = v_date;
Line: 327

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', '', 'G'||to_char(v_date,'DD-MON-YYYY')||summ.group_id, vl.group_name,
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id IN
                           (select denorm.group_id GID
                            from   jtf_rs_groups_denorm denorm
                            where  denorm.parent_group_id = substr(v_context,13)
                            and    denorm.immediate_parent_flag = 'Y'
                            )
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 347

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', '', 'A'||to_char(v_date,'DD-MON-YYYY')||summ.resource_id, res.source_name,
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id  IN
						   (
                                 SELECT DISTINCT res.resource_id
                                 FROM   jtf_rs_group_members grp, jtf_rs_resource_extns res
                                 WHERE  grp.group_id = substr(v_context,13)
                                 AND    grp.resource_id = res.resource_id
						    )
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;
Line: 376

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', vl.group_name, '',
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id    = v_default_group_id
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 391

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', '', 'G'||to_char(v_date,'DD-MON-YYYY')||summ.group_id, vl.group_name,
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id IN
                           (select denorm.group_id GID
                            from   jtf_rs_groups_denorm denorm
                            where  denorm.parent_group_id = v_default_group_id
                            and    denorm.immediate_parent_flag = 'Y'
                            )
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 411

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_LOGINS_RPT', '', 'A'||to_char(v_date,'DD-MON-YYYY')||summ.resource_id, res.source_name,
           DAY6_LOGIN, DAY5_LOGIN, DAY4_LOGIN, DAY3_LOGIN, DAY2_LOGIN, DAY1_LOGIN,
           DAY_LOGIN, PRIOR_WEEK_LOGIN, CURRENT_WEEK_LOGIN, PRIOR_MONTH_LOGIN, CURRENT_MONTH_LOGIN,
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id  IN
						   (
                                 SELECT DISTINCT res.resource_id
                                 FROM   jtf_rs_group_members grp, jtf_rs_resource_extns res
                                 WHERE  grp.group_id = v_default_group_id
                                 AND    grp.resource_id = res.resource_id
						    )
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;
Line: 452

v_session_id := icx_sec.g_session_id; -- this is used to insert the session id
Line: 457

delete from bix_dm_report
where report_code = 'BIX_UWQ_DURATIONS_RPT'
and session_id = v_session_id;
Line: 471

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', res.source_name, '',
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id = substr(v_context,13)
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;
Line: 499

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', vl.group_name, '',
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id    = substr(v_context,13)
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 523

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', '', 'G'||to_char(v_date,'DD-MON-YYYY')||summ.group_id, vl.group_name,
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id IN
                           (select denorm.group_id GID
                            from   jtf_rs_groups_denorm denorm
                            where  denorm.parent_group_id = substr(v_context,13)
                            and    denorm.immediate_parent_flag = 'Y'
                            )
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 552

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', '', 'A'||to_char(v_date,'DD-MON-YYYY')||summ.resource_id, res.source_name,
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id  IN
						   (
                                 SELECT DISTINCT res.resource_id
                                 FROM   jtf_rs_group_members grp, jtf_rs_resource_extns res
                                 WHERE  grp.group_id = substr(v_context,13)
                                 AND    grp.resource_id = res.resource_id
						    )
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;
Line: 590

   INSERT INTO bix_dm_report (report_code, col2, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', vl.group_name, '',
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id    = v_default_group_id
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 614

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', '', 'G'||to_char(v_date,'DD-MON-YYYY')||summ.group_id, vl.group_name,
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_group_sum summ, jtf_rs_groups_vl vl
   WHERE   summ.group_id IN
                           (select denorm.group_id GID
                            from   jtf_rs_groups_denorm denorm
                            where  denorm.parent_group_id = v_default_group_id
                            and    denorm.immediate_parent_flag = 'Y'
                            )
   AND     summ.group_id    = vl.group_id
   AND     summ.day         = v_date;
Line: 643

   INSERT INTO bix_dm_report (report_code, col2, col3, col4,
                                 col6, col8, col10, col12, col14, col16,
                                 col18, col20, col22, col24, col26, session_id)
   SELECT 'BIX_UWQ_DURATIONS_RPT', '', 'A'||to_char(v_date,'DD-MON-YYYY')||summ.resource_id, res.source_name,
           bix_util_pkg.get_hrmi_frmt( decode(DAY6_LOGIN,0,0,round(DAY6_DURATION/DAY6_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY5_LOGIN,0,0,round(DAY5_DURATION/DAY5_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY4_LOGIN,0,0,round(DAY4_DURATION/DAY4_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY3_LOGIN,0,0,round(DAY3_DURATION/DAY3_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY2_LOGIN,0,0,round(DAY2_DURATION/DAY2_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY1_LOGIN,0,0,round(DAY1_DURATION/DAY1_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(DAY_LOGIN,0,0,round(DAY_DURATION/DAY_LOGIN))   ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_WEEK_LOGIN,0,0,round(PRIOR_WEEK_DURATION/PRIOR_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_WEEK_LOGIN,0,0,round(CURRENT_WEEK_DURATION/CURRENT_WEEK_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(PRIOR_MONTH_LOGIN,0,0,round(PRIOR_MONTH_DURATION/PRIOR_MONTH_LOGIN)) ),
           bix_util_pkg.get_hrmi_frmt( decode(CURRENT_MONTH_LOGIN,0,0,round(CURRENT_MONTH_DURATION/CURRENT_MONTH_LOGIN)) ),
		 v_session_id
   FROM    bix_dm_uwq_agent_sum summ, jtf_rs_resource_extns res
   WHERE   summ.resource_id  IN
						   (
                                 SELECT DISTINCT res.resource_id
                                 FROM   jtf_rs_group_members grp, jtf_rs_resource_extns res
                                 WHERE  grp.group_id = v_default_group_id
                                 AND    grp.resource_id = res.resource_id
						    )
   AND     summ.resource_id = res.resource_id
   AND     summ.day         = v_date;