DBA Data[Home] [Help]

APPS.HXT_TD_UTIL SQL Statements

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

Line: 53

      o_dt_update_mod   OUT NOCOPY      VARCHAR2,
      o_error_message   OUT NOCOPY      VARCHAR2,
      o_return_code     OUT NOCOPY      NUMBER,
      p_parent_id       IN              hxt_det_hours_worked_f.parent_id%TYPE
   )
   IS
      CURSOR csr_not_transferred (
         v_tim_id      hxt_det_hours_worked_f.tim_id%TYPE,
         v_parent_id   hxt_det_hours_worked_f.parent_id%TYPE
      )
      IS
         SELECT 1
           FROM hxt_det_hours_worked hdhw
          WHERE hdhw.tim_id = v_tim_id
            AND hdhw.pay_status =  'P'                      -- Bug 6067007
            AND hdhw.pa_status  =  'P'                      -- Bug 6067007
            AND NOT EXISTS ( SELECT 1
                               FROM hxt_det_hours_worked_f hdhw2
                              WHERE hdhw.tim_id = hdhw2.tim_id
                                AND hdhw2.effective_start_date >
                                                    hdhw.effective_start_date);
Line: 82

         SELECT 1
           FROM hxt_det_hours_worked_f hdhw
          WHERE hdhw.tim_id = v_tim_id
            AND (   hdhw.pay_status = 'R'
                 OR hdhw.pa_status = 'R'
                );
Line: 96

         SELECT 1
           FROM hxt_det_hours_worked_f hdhw
          WHERE hdhw.tim_id = v_tim_id
            AND (   hdhw.pay_status = 'C'
                 OR hdhw.pa_status = 'C'
                );
Line: 109

         SELECT 1
           FROM hxt_det_hours_worked_f hdhw
          WHERE hdhw.tim_id = v_tim_id
           AND trunc(hdhw.effective_start_date)
	         = trunc(v_session_dt);
Line: 127

            SELECT hdhw.id, hdhw.parent_id, hdhw.date_worked, hdhw.pay_status,
                   hdhw.effective_start_date
              FROM hxt_det_hours_worked hdhw
             WHERE hdhw.tim_id = v_tim_id;
Line: 187

            o_dt_update_mod := 'CORRECTION';
Line: 196

	     THEN -- TC undergoing RETRO now, only UPDATE allowed.

	           if g_debug then
	         	  hr_utility.set_location ('Do UPDATE', 70);
Line: 201

	           o_dt_update_mod := 'UPDATE';
Line: 211

                   THEN -- Was it already updated today?
                         OPEN csr_changed_today (p_tim_id, p_parent_id, p_session_date);
Line: 216

                         THEN -- DT will not allow an update so error
                             o_return_code := 1; -- this means that an error should be raised
Line: 218

                             o_dt_update_mod := NULL;
Line: 219

                         ELSE -- We can allow an DT UPDATE because that will keep the history
                             if g_debug then
                     	     hr_utility.set_location ('Do UPDATE', 70);
Line: 223

                             o_dt_update_mod := 'UPDATE';
Line: 227

                   ELSE -- We can allow an DT UPDATE because that will keep the history
                         if g_debug then
                              hr_utility.set_location ('Do UPDATE', 80);
Line: 231

                         o_dt_update_mod := 'UPDATE';
Line: 245

         o_dt_update_mod := 'CORRECTION';
Line: 282

         SELECT NVL (SUM (hrw.hours), 0)
           FROM hxt_det_hours_worked hrw, --C421
                hxt_timecards tim,
                hxt_earn_groups erg,
                hxt_earn_group_types egt,
                hxt_earning_policies erp
          -- WHERE  tim.id = a_tim_id
          -- AND    hrw.tim_id = a_tim_id

          -- Changed  the above where clause as follows for supporting the
          -- OTLR Recurring Period Preference.
          WHERE tim.for_person_id = a_for_person_id
            AND hrw.tim_id = tim.id

-- This has been changed back to get total weekly hours between
-- start_day_of_week and (g_date_worked) as it was not calculating the totals
-- correctly when entering hours on more than one summary row for the same day
--  AND hrw.date_worked between NEXT_DAY(a_date_worked-7,a_start_day_of_week)
--                          and (a_date_worked - 1)

            AND hrw.date_worked BETWEEN NEXT_DAY (
                                             a_date_worked
                                           - 7,
                                           a_start_day_of_week
                                        )
                                    AND a_date_worked

-- only include earnings to be counted toward
-- hours to be worked before being eligible for overtime.
            AND erp.id = a_ep_id
            AND egt.id = erp.egt_id
            AND erg.egt_id = egt.id
            AND erg.element_type_id = hrw.element_type_id
            AND hrw.date_worked BETWEEN erp.effective_start_date
                                    AND erp.effective_end_date;
Line: 377

         SELECT NVL (SUM (hrw.hours), 0)
           FROM hxt_det_hours_worked hrw, --C421
                hxt_timecards tim,
                hxt_earn_groups erg,
                hxt_earn_group_types egt,
                hxt_earning_policies erp
          -- WHERE  tim.id = a_tim_id
          -- AND    hrw.tim_id = a_tim_id

          -- Changed  the above where clause as follows for supporting the
          -- OTLR Recurring Period Preference.
          WHERE tim.for_person_id = a_for_person_id
            AND hrw.tim_id = tim.id

-- This has been changed back to get total weekly hours between
-- start_day_of_week and (g_date_worked) as it was not calculating the totals
-- correctly when entering hours on more than one summary row for the same day
--  AND hrw.date_worked between NEXT_DAY(a_date_worked-7,a_start_day_of_week)
--                          and (a_date_worked - 1)

            AND hrw.date_worked BETWEEN NEXT_DAY (
                                             a_date_worked
                                           - 7,
                                           a_start_day_of_week
                                        )
                                    AND   a_date_worked
                                        - 1

-- only include earnings to be counted toward
-- hours to be worked before being eligible for overtime.
            AND erp.id = a_ep_id
            AND egt.id = erp.egt_id
            AND erg.egt_id = egt.id
            AND erg.element_type_id = hrw.element_type_id
            AND hrw.date_worked BETWEEN erp.effective_start_date
                                    AND erp.effective_end_date;
Line: 470

      SELECT 1
        INTO returned_element
        FROM hxt_earn_group_types egt
       WHERE egt.fcl_eg_type = 'INCLUDE'
         AND a_date_worked BETWEEN egt.effective_start_date
                               AND egt.effective_end_date
         AND egt.id = a_earn_group
         AND EXISTS ( SELECT 'x'
                        FROM hxt_earn_groups egr
                       WHERE egr.egt_id = egt.id
                         AND egr.element_type_id = a_element_type);
Line: 504

         SELECT 'C'
           FROM hxt_sum_hours_worked hrwp
          WHERE hrwp.id = a_hrw_id
            AND (   creation_date <> last_update_date
                 OR EXISTS ( SELECT '1'
                               FROM hxt_sum_hours_worked_f hrw
                              WHERE hrw.id = a_hrw_id
                                AND hrw.effective_start_date <>
                                                    hrwp.effective_start_date)
                );
Line: 530

** Modify Load_Error_Status to select the Value stored in ERR_TYPE from   **
** HXT_ERRORS rather then selecting a hard coded 'E' if the record exists. **
***************************************************************************/
   FUNCTION load_error_status (a_hrw_id IN NUMBER)
      RETURN VARCHAR2
   IS
      returned_status   VARCHAR2 (03) := '';
Line: 540

         SELECT err_type
           FROM hxt_errors err
          WHERE err.hrw_id = a_hrw_id;
Line: 584

         SELECT petv.hxt_premium_amount
           FROM hxt_pay_element_types_f_ddf_v petv
          WHERE petv.hxt_earning_category = 'OTH'
            AND petv.hxt_premium_type = 'FIXED'
            AND petv.element_type_id = c_element_type_id
            AND petv.effective_start_date <= p_effective_start_date
            AND petv.effective_end_date >= p_effective_end_date;
Line: 666

         SELECT pro.proposed_salary, ppb.pay_basis
           FROM per_pay_proposals pro,
                per_pay_bases ppb,
                per_assignments_f asg
          WHERE pro.assignment_id = p_assignment_id
            AND ppb.pay_basis_id = asg.pay_basis_id
            AND asg.assignment_id = pro.assignment_id
            AND p_eff_date BETWEEN asg.effective_start_date
                               AND asg.effective_end_date
            AND pro.approved = 'Y'
            AND pro.change_date = (SELECT MAX (pro2.change_date)
                                     FROM per_pay_proposals pro2
                                    WHERE pro2.assignment_id =
                                                              p_assignment_id
                                      AND pro2.approved = 'Y'
                                      AND p_eff_date >= pro2.change_date);
Line: 685

         SELECT ptpt.number_per_fiscal_year
           FROM per_time_periods ptp, per_time_period_types ptpt
          WHERE p_ptp_id = ptp.time_period_id
            AND ptp.period_type = ptpt.period_type;
Line: 740

*    Select and return the value ERR_TYPE from the Table         *
*    HXT_ERRORS where the tim_id passed in = HXT_ERRORS.TIM_ID.  *
*                                                                *
*  Returns                                                       *
*    returned_status - Value of ERR_TYPE where tim_id passed in  *
*    equals HXT_ERRORS.TIM_ID.0                                  *
*                                                                *
*  Arguments                                                     *
*    p_tim_id      - Time Card ID                                *
*                                                                *
*****************************************************************/
   FUNCTION load_tim_error_status (p_tim_id IN NUMBER)
      RETURN VARCHAR2
   IS
      returned_status   VARCHAR2 (3) := '';
Line: 758

         SELECT   err_type
             FROM hxt_errors err
            WHERE err.tim_id = p_tim_id
         ORDER BY err_type; -- So that 'ERR' has precedence over 'WRN'
Line: 839

         SELECT SUM (hours)
           FROM hxt_sum_hours_worked
          WHERE tim_id = p_tim_id -- AND GROUP_ID <> NVL(p_hrw_group_id, 0)
                                  AND date_worked = p_date_worked;
Line: 887

         SELECT hrw.time_in, hrw.time_out, hrw.hours, hrw.element_type_id,
                hrw.date_worked, eltv.hxt_earning_category
           FROM hxt_det_hours_worked hrw,
                hxt_pay_element_types_f_ddf_v eltv,
                pay_element_types_f elt
          WHERE elt.element_type_id = hrw.element_type_id
            AND eltv.hxt_earning_category IN ('REG', 'OVT', 'ABS')
            AND hrw.date_worked BETWEEN elt.effective_start_date
                                    AND elt.effective_end_date
            AND eltv.element_type_id = elt.element_type_id
            AND hrw.date_worked BETWEEN eltv.effective_start_date
                                    AND eltv.effective_end_date
            AND hrw.tim_id = c_tim_id
            AND hrw.time_out = c_current_time_in
            AND hrw.time_in <> hrw.time_out; --FIX endless loop PWM 01/28/99 SIR282