DBA Data[Home] [Help]

APPS.PAY_CTY_BUS SQL Statements

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

Line: 62

      select business_group_id
      from per_assignments_f
      where assignment_id = p_assignment_id
        and p_effective_date between effective_start_date and
            effective_end_date;
Line: 69

      select null
      from pay_us_emp_fed_tax_rules_f
      where assignment_id = p_assignment_id
        and p_effective_date between effective_start_date and
            effective_end_date;
Line: 166

      select state_code
      from pay_us_states
      where state_code = p_state_code;
Line: 239

      select county_code
      from pay_us_counties
      where state_code = p_state_code
        and county_code = p_county_code;
Line: 315

      select city_code
      from pay_us_city_geocodes
      where state_code = p_state_code
        and county_code = p_county_code
        and city_code = p_city_code;
Line: 392

     select count(*)
     from pay_us_city_names
     where state_code = p_state_code
       and county_code = p_county_code
       and city_code = p_city_code;
Line: 946

      select school_dst_code from pay_us_city_school_dsts
      where state_code      = p_sta_code
        and county_code     = p_cnt_code
        and city_code       = p_cty_code
        and school_dst_code = p_sch_dst_code;
Line: 959

      select school_district_code
      from pay_us_emp_city_tax_rules_f ctr
      where ctr.assignment_id         = p_asg_id
        and ctr.effective_end_date   >= p_validation_start_date
        and ctr.effective_start_date <= p_validation_end_date
        and ctr.school_district_code is not null
        and ctr.state_code            = p_sta_code
        and ctr.county_code           = p_cnt_code
        and ctr.city_code             = p_cty_code
        and ctr.emp_city_tax_rule_id
                  <> NVL(p_tax_rule_id, ctr.emp_city_tax_rule_id);
Line: 976

      select school_district_code
      from pay_us_emp_county_tax_rules_f ctr
      where ctr.assignment_id         = p_asg_id
        and ctr.effective_end_date   >= p_validation_start_date
        and ctr.effective_start_date <= p_validation_end_date
        and ctr.school_district_code is not null
        and ctr.state_code            = p_sta_code
        and ctr.county_code           = p_cnt_code;
Line: 1101

procedure chk_delete
   (p_effective_date    in   date,
    p_assignment_id     in   per_assignments_f.assignment_id%TYPE,
    p_city_code         in   pay_us_emp_city_tax_rules_f.city_code%TYPE,
    p_county_code       in   pay_us_emp_city_tax_rules_f.county_code%TYPE,
    p_state_code        in   pay_us_emp_city_tax_rules_f.state_code%TYPE,
    p_delete_mode       in   varchar2,
    p_delete_routine    in   varchar2
   )
   is
--
   l_proc                    varchar2(72) := g_package||'chk_delete';
Line: 1120

      select prr.run_result_id from
             pay_run_results prr,
             pay_assignment_actions paa,
             per_assignments_f paf   -- Bug 3419786
      where paf.assignment_id = p_assignment_id   -- Bug 3419786
        and paf.assignment_id = paa.assignment_id
        and prr.assignment_action_id = paa.assignment_action_id
        and prr.jurisdiction_code =
             p_state_code||'-'||p_county_code||'-'||p_city_code
        and  exists (select null
                     from pay_payroll_actions ppa,
                          pay_payrolls_f ppf  -- Bug 3419786
                     where ppa.payroll_action_id = paa.payroll_action_id
                     and ppa.action_type in ('Q','R')
                     and ppa.date_earned > p_csr_tmp_date
                     and ppa.payroll_id = ppf.payroll_id  -- Bug 3419786
                     and ppa.effective_date between ppf.effective_start_date
                         and ppf.effective_end_date
                     and ppf.payroll_id >= 0
                     and ppf.payroll_id = paf.payroll_id
                    );
Line: 1147

       select hrl.location_id
       from   per_assignments_f   paf,
              hr_locations        hrl
       where  paf.assignment_id   = p_assignment_id
       and    hrl.location_id     = paf.location_id
       and    paf.effective_end_date > p_csr_tmp_date
       and    exists (select null
                      from pay_us_states pus,
                           pay_us_counties puc,
                           pay_us_city_names pucn
                      where pus.state_abbrev = hrl.region_2
                        and pus.state_code   = p_state_code
                        and puc.state_code   = pus.state_code
                        and puc.county_name  = hrl.region_1
                        and puc.county_code  = p_county_code
                        and pucn.state_code   = pus.state_code
                        and pucn.county_code  = puc.county_code
                        and pucn.city_name    = hrl.town_or_city
                        and pucn.city_code    = p_city_code);
Line: 1174

      select 1
       from   per_assignments_f   paf,
              per_addresses       pa
       where  paf.assignment_id   = p_assignment_id
       and    pa.person_id        = paf.person_id
       and    pa.primary_flag = 'Y'
       and    nvl(pa.date_to, hr_api.g_eot) > p_csr_tmp_date
       and    exists (select null
                      from pay_us_states pus,
                           pay_us_counties puco,
                           pay_us_city_names puci
                      where pus.state_abbrev = pa.region_2
                        and pus.state_code   = p_state_code
                        and puco.state_code  = pus.state_code
                        and puco.county_name = pa.region_1
                        and puco.county_code = p_county_code
                        and puci.state_code  = pus.state_code
                        and puci.county_code = puco.county_code
                        and puci.city_name   = pa.town_or_city
                        and puci.city_code   = p_city_code);
Line: 1200

   if p_delete_mode in ('ZAP','DELETE') then
      hr_utility.set_location(l_proc, 10);
Line: 1202

      if p_delete_mode = hr_api.g_zap then
         l_effective_date := trunc(hr_api.g_sot);
Line: 1207

      if p_delete_mode = 'DELETE' and p_delete_routine = 'ASSIGNMENT' then
         open chk_city_payroll(l_effective_date);
Line: 1212

            hr_utility.set_message(801,'PAY_52235_TAX_RULE_DELETE');
Line: 1219

   if p_delete_mode = 'ZAP' and p_delete_routine <> 'ASSIGNMENT' then
      hr_utility.set_location(l_proc, 15);
Line: 1241

   if p_delete_mode <> 'ZAP' and p_delete_routine <> 'ASSIGNMENT' then
      hr_utility.set_message(801,'PAY_52971_TAX_ZAP_ONLY');
Line: 1247

end chk_delete;
Line: 1274

Procedure chk_non_updateable_args
   (p_rec            in pay_cty_shd.g_rec_type,
    p_effective_date in date
   ) is
--
   l_proc      varchar2(72) := g_package||'chk_non_updateable_args';
Line: 1348

end chk_non_updateable_args;
Line: 1380

Procedure dt_update_validate
            (
           p_datetrack_mode                 in varchar2,
             p_validation_start_date           in date,
           p_validation_end_date           in date) Is
--
  l_proc          varchar2(72) := g_package||'dt_update_validate';
Line: 1440

End dt_update_validate;
Line: 1477

Procedure dt_delete_validate
            (p_emp_city_tax_rule_id      in number,
             p_datetrack_mode            in varchar2,
           p_validation_start_date       in date,
           p_validation_end_date         in date) Is
--
  l_proc      varchar2(72)  := g_package||'dt_delete_validate';
Line: 1500

  If (p_datetrack_mode = 'DELETE' or
      p_datetrack_mode = 'ZAP') then
    --
    --
    -- Ensure the arguments are not null
    --
    hr_api.mandatory_arg_error
      (p_api_name       => l_proc,
       p_argument       => 'validation_start_date',
       p_argument_value => p_validation_start_date);
Line: 1544

End dt_delete_validate;
Line: 1549

Procedure insert_validate
      (p_rec                   in pay_cty_shd.g_rec_type,
       p_effective_date        in date,
       p_datetrack_mode        in varchar2,
       p_validation_start_date in date,
       p_validation_end_date   in date) is
--
  l_proc      varchar2(72) := g_package||'insert_validate';
Line: 1644

End insert_validate;
Line: 1649

Procedure update_validate
      (p_rec                   in pay_cty_shd.g_rec_type,
       p_effective_date        in date,
       p_datetrack_mode        in varchar2,
       p_validation_start_date in date,
       p_validation_end_date   in date) is
--
  l_proc      varchar2(72) := g_package||'update_validate';
Line: 1663

  chk_non_updateable_args
   (p_rec                  => p_rec,
    p_effective_date       => p_effective_date
   );
Line: 1717

  dt_update_validate
    (
     p_datetrack_mode                => p_datetrack_mode,
     p_validation_start_date         => p_validation_start_date,
     p_validation_end_date           => p_validation_end_date);
Line: 1724

End update_validate;
Line: 1729

Procedure delete_validate
      (p_rec                   in pay_cty_shd.g_rec_type,
       p_effective_date        in date,
       p_datetrack_mode        in varchar2,
       p_delete_routine        in varchar2,
       p_validation_start_date in date,
       p_validation_end_date   in date) is
--
  l_proc      varchar2(72) := g_package||'delete_validate';
Line: 1744

  chk_delete
    (p_effective_date           => p_effective_date,
     p_assignment_id            => pay_cty_shd.g_old_rec.assignment_id,
     p_city_code                => pay_cty_shd.g_old_rec.city_code,
     p_county_code              => pay_cty_shd.g_old_rec.county_code,
     p_state_code               => pay_cty_shd.g_old_rec.state_code,
     p_delete_mode              => p_datetrack_mode,
     p_delete_routine           => p_delete_routine
    );
Line: 1756

  dt_delete_validate
    (p_datetrack_mode         => p_datetrack_mode,
     p_validation_start_date  => p_validation_start_date,
     p_validation_end_date    => p_validation_end_date,
     p_emp_city_tax_rule_id   => p_rec.emp_city_tax_rule_id);
Line: 1763

End delete_validate;
Line: 1776

    select a.legislation_code
    from   per_business_groups a,
           pay_us_emp_city_tax_rules_f b
    where b.emp_city_tax_rule_id      = p_emp_city_tax_rule_id
    and   a.business_group_id = b.business_group_id;