DBA Data[Home] [Help]

APPS.PAY_STA_BUS SQL Statements

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

Line: 46

    select null
    from   pay_us_states a
    where  a.state_code = p_state_code;
Line: 136

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

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

    select state_abbrev
      from pay_us_states pus,
           pay_us_emp_state_tax_rules_f str
     where pus.state_code = str.state_code
       and str.emp_state_tax_rule_id = p_emp_state_tax_rule_id;
Line: 368

    select null
    from   pay_us_states pus, pay_state_rules psr
    where  pus.state_code = p_state_code
    and    pus.state_abbrev = psr.state_code
    and    psr.jurisdiction_code = p_jurisdiction_code;
Line: 529

    select psr.fs_lookup_type
    from   pay_us_states pus, pay_state_rules psr
    where  pus.state_code = p_state_code
    and    pus.state_abbrev = psr.state_code;
Line: 1166

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

end chk_non_updateable_args;
Line: 1263

procedure chk_delete
  (p_emp_state_tax_rule_id           in number
  ,p_assignment_id                   in number
  ,p_effective_date                  in date
  ,p_datetrack_mode                  in varchar2
  ,p_validation_start_date           in date
  ,p_validation_end_date             in date
  ,p_delete_routine                  in varchar2   default null
  ) is
  --
  l_effective_date   date;
Line: 1275

  l_proc       varchar2(72) := g_package||'chk_delete';
Line: 1279

      select null
      from   pay_run_results prr,
             pay_assignment_actions paa
      where substr(prr.jurisdiction_code,1,2)=pay_sta_shd.g_old_rec.state_code
        and  paa.assignment_action_id = prr.assignment_action_id
        and  paa.assignment_id = pay_sta_shd.g_old_rec.assignment_id
        and  exists (select null
                     from pay_payroll_actions ppa
                     where ppa.payroll_action_id = paa.payroll_action_id
                     and ppa.action_type in ('Q','R')
                     and ppa.date_earned > p_csr_tmp_date
                    );
Line: 1293

      select null
      from   per_assignments_f asg,
             hr_locations      hrl
      where  asg.assignment_id = pay_sta_shd.g_old_rec.assignment_id
        and  hrl.location_id = asg.location_id
        and  asg.effective_end_date > p_csr_tmp_date
        and  exists (select null
                     from pay_us_states pus
                     where pus.state_abbrev = hrl.region_2
                     and pus.state_code = pay_sta_shd.g_old_rec.state_code);
Line: 1305

      select null
      from   per_assignments_f asg,
             per_addresses pad
      where  asg.assignment_id = pay_sta_shd.g_old_rec.assignment_id
        and  pad.person_id = asg.person_id
        and  pad.primary_flag = 'Y'
        and  nvl(pad.date_to, hr_api.g_eot) > p_csr_tmp_date
        and  exists (select null
                     from pay_us_states pus
                     where pus.state_abbrev = pad.region_2
                     and pus.state_code = pay_sta_shd.g_old_rec.state_code);
Line: 1321

      select null
       from  pay_us_emp_county_tax_rules_f cnt
       where cnt.assignment_id      = p_assignment_id
       and   cnt.state_code         = pay_sta_shd.g_old_rec.state_code
       and   cnt.effective_end_date > p_effective_date;
Line: 1348

  if nvl(p_delete_routine,'X') = 'ASSIGNMENT' then
    --
    -- Perform validation for valid datetrack delete modes.
    --
    If p_datetrack_mode in(hr_api.g_zap, hr_api.g_delete) then
      --
      hr_utility.set_location(l_proc,20);
Line: 1369

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

  else          -- p_delete_routine <> 'ASSIGNMENT'
    --
    hr_utility.set_location(l_proc,20);
Line: 1389

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

end chk_delete;
Line: 1477

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: 1537

End dt_update_validate;
Line: 1574

Procedure dt_delete_validate
            (p_emp_state_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: 1597

  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: 1641

End dt_delete_validate;
Line: 1646

Procedure insert_validate
      (p_rec                   in pay_sta_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: 1739

End insert_validate;
Line: 1744

Procedure update_validate
      (p_rec                   in pay_sta_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: 1758

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

  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: 1832

End update_validate;
Line: 1837

Procedure delete_validate
      (p_rec                    in pay_sta_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,
       p_delete_routine        in varchar2
      ) is
--
  l_proc      varchar2(72) := g_package||'delete_validate';
Line: 1853

  chk_delete
  (p_emp_state_tax_rule_id   => p_rec.emp_state_tax_rule_id
  ,p_assignment_id           => pay_sta_shd.g_old_rec.assignment_id
  ,p_effective_date          => p_effective_date
  ,p_datetrack_mode          => p_datetrack_mode
  ,p_validation_start_date   => p_validation_start_date
  ,p_validation_end_date     => p_validation_end_date
  ,p_delete_routine          => p_delete_routine
  );
Line: 1863

  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_state_tax_rule_id  => p_rec.emp_state_tax_rule_id);
Line: 1870

End delete_validate;
Line: 1883

    select a.legislation_code
    from   per_business_groups a,
           pay_us_emp_state_tax_rules_f b
    where b.emp_state_tax_rule_id      = p_emp_state_tax_rule_id
    and   a.business_group_id = b.business_group_id;