DBA Data[Home] [Help]

APPS.PAY_BALANCE_UTILITIES SQL Statements

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

Line: 25

       select pus.state_code,
              puc.county_code,
              puci.city_code,
              pus.state_name,
              puc.county_name,
              puci.city_name
       from   PER_ASSIGNMENTS_F   paf,
              HR_LOCATIONS        hrl,
              PAY_US_STATES       pus,
              PAY_US_COUNTIES     puc,
              PAY_US_CITY_NAMES   puci
       where  paf.assignment_id         = p_assignment_id
       and    p_session_date between paf.effective_start_date and
                                     paf.effective_end_date
       and    paf.location_id           = hrl.location_id
       and    pus.state_abbrev          = hrl.region_2
       and    puc.state_code            = pus.state_code
       and    puc.county_name           = hrl.region_1
       and    puci.state_code           = pus.state_code
       and    puci.county_code          = puc.county_code
       and    puci.city_name            = hrl.town_or_city;
Line: 83

   SELECT max(paa.assignment_action_id), ppa.action_type, ppa.effective_date
   FROM   pay_payroll_actions    ppa,
          pay_assignment_actions paa
   WHERE  paa.assignment_id = p_assignment_id
   AND    ppa.effective_date <= p_date
   AND    to_char(ppa.effective_date,'YYYY') = to_char(p_date,'YYYY')
   and    ppa.payroll_action_id = paa.payroll_action_id
   and    ppa.action_type in ('Q','R','V','I','B')
   and    paa.action_status = 'C'
   and   paa.tax_unit_id = p_tax_unit_id
   and   paa.action_sequence =
         ( SELECT max(paa2.action_sequence)
           FROM pay_assignment_actions paa2,
                pay_payroll_actions    ppa2
           WHERE paa2.assignment_id = paa.assignment_id
           AND   ppa2.effective_date <= p_date
           AND   to_char(ppa2.effective_date,'YYYY') = to_char(p_date,'YYYY')
           and   ppa2.payroll_action_id = paa2.payroll_action_id
           and   ppa2.action_type in ('Q','R','V','I','B')
           and   paa2.action_status = 'C'
           and   paa2.tax_unit_id = paa.tax_unit_id
         )
   group by action_type, effective_date;