DBA Data[Home] [Help]

APPS.PER_ASG_BUS2 SQL Statements

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

Line: 34

     select   business_group_id
     from     per_pay_bases
     where    pay_basis_id = p_pay_basis_id;
Line: 42

     select   nvl(max(change_date),p_validation_start_date)
     from     per_pay_proposals
     where    assignment_id = p_assignment_id;
Line: 169

  ,p_payroll_id_updated    out nocopy boolean
  ,p_object_version_number in per_all_assignments_f.object_version_number%TYPE
  )
  is
  --
  l_proc                         varchar2(72) :=  g_package||'chk_payroll_id';
Line: 177

    select   address_line1
    from     per_addresses
    where    person_id = p_person_id
    and      primary_flag='Y'
    and      ( (style='US' and region_1 is not null)
             or style<>'US');
Line: 187

     select   date_of_birth
     from     per_people_f
     where    person_id    = p_person_id
     and      p_effective_date between effective_start_date
                                   and effective_end_date;
Line: 194

  l_payroll_id_updated boolean;
Line: 223

  ,p_payroll_id_updated    => l_payroll_id_updated
  ,p_object_version_number => p_object_version_number
  );
Line: 227

  p_payroll_id_updated:=l_payroll_id_updated;
Line: 249

  ,p_payroll_id_updated    out nocopy boolean
  ,p_object_version_number in per_all_assignments_f.object_version_number%TYPE
  )
  is
  --
  l_legislation_code             per_business_groups.legislation_code%TYPE;
Line: 278

  select legislation_code
  from per_business_groups_perf
  where business_group_id = p_business_group_id;
Line: 284

    select   null
    from     sys.dual
    where exists(select   null
                 from     pay_all_payrolls_f pp
                 where    p_effective_date
                          between pp.effective_start_date
                          and     pp.effective_end_date
                 and      pp.payroll_id = p_payroll_id);
Line: 294

     select   business_group_id
     from     pay_all_payrolls_f
     where    payroll_id    = p_payroll_id
     and      p_effective_date between effective_start_date
                               and     effective_end_date;
Line: 301

    select ppm.personal_payment_method_id
          ,ppm.org_payment_method_id
          ,min(ppm.effective_start_date)
          ,max(ppm.effective_end_date)
    from   pay_personal_payment_methods_f ppm
    where  ppm.assignment_id         = p_assignment_id
    and    ppm.effective_start_date <= p_validation_end_date
    and    ppm.effective_end_date   >= p_validation_start_date
    group by ppm.personal_payment_method_id
            ,ppm.org_payment_method_id;
Line: 317

    select opu.org_pay_method_usage_id
          ,min(opu.effective_start_date)
          ,max(opu.effective_end_date)
    from   pay_org_pay_method_usages_f opu
    where  opu.org_payment_method_id  = c_org_payment_method_id
    and    opu.payroll_id             = p_payroll_id
    and    opu.effective_start_date  <= c_effective_end_date
    and    opu.effective_end_date    >= c_effective_start_date
    group by opu.org_pay_method_usage_id
    order by 2;
Line: 329

    select null
    from   per_all_assignments_f asg
    where  asg.assignment_id         = p_assignment_id
    and    asg.payroll_id           <> p_payroll_id
    and    asg.effective_start_date <= p_validation_end_date
    and    asg.effective_end_date   >= p_validation_start_date;
Line: 337

    select null
    from   pay_assignment_actions asa
          ,pay_payroll_actions    pra
          ,per_all_assignments_f  paf
    where  asa.assignment_id      = p_assignment_id
    and    pra.payroll_action_id  = asa.payroll_action_id
    --
    -- Fix for bug 3693830 starts here.
    --
    and    paf.assignment_id = p_assignment_id
    and    nvl(paf.payroll_id,-1) <> nvl(p_payroll_id,-1)
    and    paf.effective_end_date >= p_validation_start_date
    and    paf.effective_start_date <= p_validation_end_date
    --
    -- Fix for bug 3693830 ends here.
--
-- Start of Bug fix: 2185300.
--
    and    pra.action_type        not in ('X','BEE')   -- Fix for bug# 2711532
    and    ((pra.effective_date
    between p_validation_start_date
    and p_validation_end_date  )
    --updated for bug 8450873
    /*or  (nvl(pra.date_earned,p_validation_start_date-1)   >= p_validation_start_date
         and nvl(pra.date_earned,p_validation_end_date+1) <= p_validation_end_date )*/
    );
Line: 368

      select style
      from  per_addresses a
      where a.person_id  = p_person_id and a.primary_flag   = 'Y'
      and   p_effective_date between a.date_from and nvl(a.date_to,hr_api.g_eot);
Line: 380

  p_payroll_id_updated := FALSE;
Line: 436

      p_payroll_id_updated := TRUE;
Line: 579

      and  (p_datetrack_mode = 'DELETE_NEXT_CHANGE'
        or    p_datetrack_mode = 'FUTURE_CHANGE'
        or    p_datetrack_mode = 'UPDATE_OVERRIDE'
        or   p_datetrack_mode = 'UPDATE_CHANGE_INSERT')) --added for bug 8404508
  then
    --
    hr_utility.set_location(l_proc, 100);
Line: 793

  or  (p_datetrack_mode = 'DELETE_NEXT_CHANGE'
  or   p_datetrack_mode = 'FUTURE_CHANGE'
  or   p_datetrack_mode = 'UPDATE_OVERRIDE'
  or   p_datetrack_mode = 'UPDATE_CHANGE_INSERT'            -- added for bug 8404508
      )
  then
    --
    hr_utility.set_location(l_proc, 220);
Line: 856

    select   enabled_flag
    from     pay_people_groups
    where    people_group_id = p_people_group_id
    and      p_validation_start_date
      between nvl(start_date_active,hr_api.g_sot)
      and     nvl(end_date_active,hr_api.g_eot);
Line: 864

    select   null
    from     per_business_groups_perf pbg
             ,pay_people_groups ppg
    where    ppg.people_group_id = p_people_group_id
    and      pbg.people_group_structure = to_char(ppg.id_flex_num)
    and      pbg.business_group_id = p_business_group_id;
Line: 1287

    select   business_group_id, actual_termination_date
    from     per_periods_of_service
    where    period_of_service_id = p_period_of_service_id
    and      p_validation_start_date
      between  date_start
      and      nvl(actual_termination_date, hr_api.g_eot);
Line: 1434

     select   ppf.business_group_id
     from     per_people_f ppf
     where    ppf.person_id = p_person_id
     and      p_effective_date between ppf.effective_start_date
                               and     ppf.effective_end_date;
Line: 1503

    select   business_group_id, current_employee_flag, current_npw_flag
    from     per_all_people_f
    where    person_id = p_person_referred_by_id
    and      p_validation_start_date
      between  effective_start_date
        and    effective_end_date;
Line: 1675

    select   hp.business_group_id
    from     hr_positions_f hp
             , per_shared_types ps
    where    hp.position_id    = p_position_id
    and      p_validation_start_date
    between  hp.effective_start_date
    and      hp.effective_end_date
    and      p_validation_start_date
    between  hp.date_effective
    and      nvl(hp.date_end, hr_api.g_eot)
    and      ps.shared_type_id = hp.availability_status_id
    and      ps.system_type_cd = 'ACTIVE' ;
Line: 1804

    select   null
    from     per_valid_grades
    where    position_id = p_position_id
    and      p_validation_start_date
    between  date_from
      and      nvl(date_to, hr_api.g_eot);
Line: 1814

    select   null
    from     per_valid_grades
    where    position_id = p_position_id
    and      grade_id = p_grade_id
    and      p_validation_start_date
      between  date_from
        and      nvl(date_to, hr_api.g_eot);
Line: 1933

    select   null
    from     hr_positions_f hp
             , per_shared_types ps
    where    hp.position_id     = p_position_id
    and      p_validation_start_date
    between  hp.effective_start_date
    and      hp.effective_end_date
    and      hp.organization_id = p_organization_id
    and      p_validation_start_date
    between  hp.date_effective
    and      nvl(hp.date_end, hr_api.g_eot)
    and      ps.shared_type_id  = hp.availability_status_id
    and      ps.system_type_cd  = 'ACTIVE' ;
Line: 2053

    select   null
    from     hr_positions_f hp
             , per_shared_types ps
    where    hp.position_id = p_position_id
    and      p_validation_start_date
    between  hp.effective_start_date
    and      hp.effective_end_date
    and      hp.job_id = p_job_id
    and      p_validation_start_date
    between  hp.date_effective
    and      nvl(hp.date_end,hr_api.g_eot)
    and      ps.shared_type_id = hp.availability_status_id
    and      ps.system_type_cd = 'ACTIVE' ;
Line: 2178

    select   null
    from     per_all_assignments_f
    where    person_id = p_person_id
    and      period_of_service_id = p_period_of_service_id
    and      primary_flag = 'Y';
Line: 2185

    select   null
    from     per_all_assignments_f
    where    person_id = p_person_id
    and      period_of_placement_date_start = p_pop_date_start
    and      primary_flag = 'Y';
Line: 2194

    SELECT business_group_id
      FROM per_all_people_f
     WHERE person_id = p_person_id
       AND p_effective_date BETWEEN effective_start_date
                                AND effective_end_date;
Line: 2203

    SELECT per_system_status
    FROM   per_ass_status_type_amends
    WHERE  assignment_status_type_id = per_asg_shd.g_old_rec.assignment_status_type_id
    AND    business_group_id = csr_chk_amends.p_bg_id;
Line: 2209

    SELECT per_system_status
    FROM   per_assignment_status_types
    WHERE  assignment_status_type_id = per_asg_shd.g_old_rec.assignment_status_type_id;
Line: 2236

    select   null
    from     sys.dual
    where exists
      (select  null
       from    per_all_assignments_f pas
       where   pas.effective_start_date <= p_validation_start_date
       and     pas.person_id = p_person_id
       and     pas.period_of_service_id = p_period_of_service_id
--
-- 120.10 (START)
--
       --and     pas.primary_flag = 'Y');
Line: 2250

         (select null
          from   per_all_assignments_f pas1
          where  pas1.effective_start_date <= p_validation_start_date
          and    pas1.person_id = p_person_id
          and    pas1.period_of_service_id <> p_period_of_service_id
          and    pas1.primary_flag = 'Y'
         )
       );
Line: 2263

    select   null
    from     sys.dual
    where exists
      (select  null
       from    per_all_assignments_f pas
       where   pas.effective_start_date <= p_validation_start_date
       and     pas.person_id = p_person_id
       and     pas.period_of_placement_date_start = p_pop_date_start
       and     pas.primary_flag = 'Y');
Line: 2835

    select   business_group_id, current_employee_flag, current_npw_flag
   --from     per_people_f bug 5078945
    from     per_all_people_f
    where    person_id = p_recruiter_id
    and      p_validation_start_date
      between  effective_start_date
      and      nvl(effective_end_date, hr_api.g_eot);
Line: 2994

    select   business_group_id
    from     per_recruitment_activities
    where    recruitment_activity_id = p_recruitment_activity_id
    and      p_validation_start_date
      between  date_start
        and    nvl(date_end, hr_api.g_eot);
Line: 3155

     select   null
     from     sys.dual
     where exists(select   null
                  from     per_events pe
                  where    pe.assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       (p_datetrack_mode = 'DELETE'
                  and       date_start > p_validation_start_date))
                  and      not exists
                           (select null
                              from irc_interview_details iid
                             where pe.event_id = iid.event_id)
               );
Line: 3171

     select   null
     from     sys.dual
     where exists(select   null
                  from     per_letter_request_lines
                  where    assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       (p_datetrack_mode = 'DELETE'
                  and       date_from > p_validation_start_date)));*/
Line: 3182

     select   null
     from     sys.dual
     where exists(select   null
                  from     pay_cost_allocations_f
                  where    assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       (p_datetrack_mode = 'DELETE'
                  and       effective_start_date > p_validation_start_date)));
Line: 3192

     select   null
     from     sys.dual
     where exists(select   null
                  from     pay_personal_payment_methods_f
                  where    assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       (p_datetrack_mode = 'DELETE'
                  and       effective_start_date > p_validation_start_date)));
Line: 3202

     select   null
     from     sys.dual
     where exists(select null
                  from   pay_assignment_actions aa
                  ,      pay_payroll_actions pa
                  where  aa.assignment_id = p_assignment_id
                  and    pa.payroll_action_id = aa.payroll_action_id
                  and    (p_datetrack_mode = 'ZAP'
                  or     (p_datetrack_mode = 'DELETE'
                  and     pa.effective_date > p_validation_start_date))
                  and    pa.action_type not in ('X','BEE'));  -- Fix for bug# 2711532
Line: 3215

     select   null
     from     sys.dual
     where exists(select   null
                  from     per_secondary_ass_statuses
                  where    assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       (p_datetrack_mode = 'DELETE'
                  and       start_date > p_validation_start_date)));
Line: 3225

     select   null
     from     sys.dual
     where exists(select   null
                  from     per_cobra_cov_enrollments
                  where    assignment_id = p_assignment_id
                  and      (p_datetrack_mode = 'ZAP'
                  or       ((p_datetrack_mode = 'DELETE'
                  and      coverage_start_date is null)
                  or       (coverage_start_date > p_validation_start_date))));
Line: 3236

     select   null
     from     sys.dual
     where exists(select null
                  from   per_cobra_coverage_benefits_f b
                  ,      per_cobra_cov_enrollments e
                  where  e.assignment_id = p_assignment_id
                  and    e.cobra_coverage_enrollment_id =
                         b.cobra_coverage_enrollment_id
                  and    (p_datetrack_mode = 'ZAP'
                  or     (p_datetrack_mode = 'DELETE'
                  and     b.effective_start_date > p_validation_start_date)));
Line: 3249

     select   null
     from     sys.dual
     where exists(select   null
                  from     per_assignment_extra_info
                  where    assignment_id = p_assignment_id);
Line: 3256

     select   null
     from     sys.dual
     where exists(select   null
                  from     hr_assignment_set_amendments
                  where    assignment_id = p_assignment_id);
Line: 3723

    select   null
    from     gl_sets_of_books
    where    set_of_books_id = p_set_of_books_id;
Line: 3728

    select   null
    from     financials_system_params_all
    where    set_of_books_id   = p_set_of_books_id
    and      business_group_id = p_business_group_id;
Line: 3845

    select   null
    from     hr_soft_coding_keyflex
    where    soft_coding_keyflex_id = p_soft_coding_keyflex_id
    and      enabled_flag = 'Y'
    and      p_validation_start_date
      between nvl(start_date_active,hr_api.g_sot)
      and     nvl(end_date_active,hr_api.g_eot);
Line: 3854

    select legislation_code
    from per_business_groups_perf
    where business_group_id = p_business_group_id;
Line: 3859

    select null
    from pay_legislation_rules
    where legislation_code = l_legislation_code
    and rule_type = 'TAX_UNIT'
    and rule_mode = 'Y';
Line: 3866

    select 1 from fnd_new_messages
    where message_name = p_message_name
    and application_id = 801;
Line: 4008

    select   business_group_id
    from     per_organization_units
    where    organization_id = p_source_organization_id
    and      p_validation_start_date
      between  date_from
        and    nvl(date_to, hr_api.g_eot);
Line: 4075

        else -- inserting an employee assignment
          --
          hr_utility.set_message(801, 'HR_51219_ASG_INV_EASG_I_SORG');
Line: 4148

    select   type
    from     per_recruitment_activities
    where    recruitment_activity_id = p_recruitment_activity_id;
Line: 4278

     select   1
     from     sys.dual
     where exists
          (select  null
             from  per_spinal_point_steps_f psps
            where  psps.effective_start_date <= p_validation_start_date
              and  psps.step_id               = p_special_ceiling_step_id
              and (exists
                  (select null
                     from per_spinal_point_steps_f psps2
                    where psps2.effective_end_date >= p_validation_end_date
                      and psps2.step_id             = p_special_ceiling_step_id
                      and psps2.grade_spine_id      = psps.grade_spine_id)));
Line: 4293

     select   pgs.business_group_id
     from     per_grade_spines_f pgs
     where    pgs.ceiling_step_id = p_special_ceiling_step_id
     and      p_effective_date    between pgs.effective_start_date
                                  and     pgs.effective_end_date;
Line: 4300

     select   psps.sequence
     from     per_grade_spines_f pgs,
              per_spinal_point_steps_f psps
     where    psps.step_id       = p_special_ceiling_step_id
       and    pgs.grade_id       = p_grade_id
       and    pgs.grade_spine_id = psps.grade_spine_id
       and    p_effective_date between pgs.effective_start_date
                                   and pgs.effective_end_date
       and    p_effective_date between psps.effective_start_date
                                   and psps.effective_end_date;
Line: 4312

     select   1
     from     sys.dual
     where exists(select null
                  from  per_spinal_point_placements_f pspp
                  ,     per_spinal_point_steps_f      psps
                  ,     per_grade_spines_f            pgs
                  where pspp.assignment_id = p_assignment_id
                  and   pspp.step_id = psps.step_id
                  and   psps.grade_spine_id=pgs.grade_spine_id
                  and   pgs.grade_id = p_grade_id
                  and   psps.sequence > l_sequence
                  and   pspp.effective_start_date <= p_validation_end_date
                  and   pspp.effective_end_date >= p_validation_start_date
                  and   psps.effective_start_date between psps.effective_start_date
                                             and psps.effective_end_date
                  and   psps.effective_start_date between  pgs.effective_start_date
                                             and  pgs.effective_end_date);
Line: 4524

   select party_id
   from   per_all_people_f
   where  person_id = p_per_id
   and    p_validation_start_date
      between  effective_start_date
        and    effective_end_date;
Line: 4538

   select assignment_type
   from per_all_assignments_f asg
   where asg.assignment_id = p_assignment_id
   and  p_validation_start_date
      between asg.effective_start_date
        and asg.effective_end_date;
Line: 4546

    select   business_group_id, current_employee_flag, current_npw_flag
    from     per_all_people_f
    where    person_id = p_supervisor_id
    and      p_validation_start_date
      between  effective_start_date
        and    effective_end_date;
Line: 4556

    select   business_group_id, current_employee_flag, current_npw_flag
    from     per_all_people_f
    where    person_id = p_supervisor_id;
Line: 4658

      select status into l_inst_type from fnd_product_installations
       where application_id = 800;
Line: 4764

   select   paaf.assignment_type
   from     per_all_assignments_f paaf
   where    paaf.person_id = p_supervisor_id
   and      p_supervisor_id is not null
   and      paaf.assignment_id = p_supervisor_assignment_id
   and      p_validation_start_date between
            paaf.effective_start_date and paaf.effective_end_date;
Line: 4970

  if p_datetrack_mode in ('UPDATE_OVERRIDE',
                          'ZAP',
                          'FUTURE_CHANGE',
                          'DELETE_NEXT_CHANGE') then
    --
    -- Get current value for system_person_type (i.e. as of the
    -- effective date)
    --
	-- ER FPT
	if hrempter.g_fpt_rev_ter = 'N'
	or (nvl(fnd_profile.value('HR_ALLOW_FPT_UPDATES'),'N') = 'N') then

		per_per_bus.chk_system_pers_type
		  (p_person_id             => p_person_id
		  ,p_validation_start_date => p_validation_start_date
		  ,p_validation_end_date   => p_validation_end_date
		  ,p_datetrack_mode        => p_datetrack_mode
		  ,p_effective_date        => p_effective_date
		  );
Line: 5050

     select   null
     from     per_all_assignments_f pas
     ,        per_assignment_status_types past
     where    pas.assignment_id = p_assignment_id
     and      pas.effective_start_date >= p_validation_start_date
     and      past.assignment_status_type_id = pas.assignment_status_type_id
     and      past.per_system_status = 'TERM_ASSIGN';
Line: 5063

  if p_datetrack_mode in ('UPDATE_OVERRIDE'
                         ,'FUTURE_CHANGE'
                         ,'DELETE_NEXT_CHANGE') then
    open csr_chk_term_status;
Line: 5217

  ,p_datetrack_mode        =>  'INSERT'
  );
Line: 5254

   select paf.assignment_id
   from per_all_assignments_f paf
     ,per_applications        pa
     ,per_vacancies           pv
   where paf.application_id = pa.application_id
     and pa.date_end is null
     and paf.vacancy_id = pv.vacancy_id
     and paf.person_id = p_person_id
     and paf.vacancy_id = p_vacancy_id
     and paf.assignment_type = p_assignment_type
     and paf.assignment_id <> nvl(p_assignment_id,0)
     and (p_validation_start_date between paf.effective_start_date and paf.effective_end_date
          or
	  paf.effective_end_date >= p_validation_start_date);
Line: 5273

  select paf.assignment_id
  from per_all_assignments_f paf
    ,per_applications        pa
    ,per_vacancies           pv
  where paf.application_id = pa.application_id
    and pa.date_end  is null
    and paf.vacancy_id = pv.vacancy_id
    and paf.person_id = p_person_id
    and paf.vacancy_id = p_vacancy_id
    and paf.assignment_type = p_assignment_type
    and paf.assignment_id <> nvl(p_assignment_id,0)
    and (p_validation_start_date between paf.effective_start_date and paf.effective_end_date
         or
	 p_validation_end_date between paf.effective_start_date and paf.effective_end_date);
Line: 5290

    select     pa.application_id
    from
        per_applications     pa,
             per_all_assignments_f     paf,
             per_vacancies         pv
    where
          paf.person_id         = p_person_id
    and   paf.vacancy_id          = pv.vacancy_id
    and   paf.vacancy_id          = p_vacancy_id
    and   paf.application_id     = pa.application_id
    and   paf.business_group_id    = p_business_group_id
    and   p_effective_date between paf.effective_start_date
                   and paf.effective_end_date
    and   pa.date_end         is null;
Line: 5315

   or  p_assignment_type is null) and p_datetrack_mode not in ('ZAP','DELETE')
  then

  -- Start changes for bug 8687386
  --
    /*  open csr_dup_apl_vacancy;
Line: 5407

    select   business_group_id
    from     per_vacancies
    where    vacancy_id = p_vacancy_id
    and      p_validation_start_date
      between  date_from
        and    nvl(date_to, hr_api.g_eot);
Line: 5415

    select   business_group_id
    from     per_vacancies
    where    vacancy_id = p_vacancy_id;
Line: 5478

        else -- inserting a non employee
          --
          hr_utility.set_message(801, 'HR_51221_ASG_INV_EASG_I_VAC');
Line: 5567

     select nvl(max(assignment_sequence),0) +1
     from   per_all_assignments_f
     where  person_id       = p_person_id
     and    assignment_type = p_assignment_type;
Line: 5646

     select   null
     from     per_all_assignments_f pas
     where    pas.organization_id  =      p_organization_id
     and      pas.assignment_type  =      'E'
     and      pas.manager_flag     =      'Y'
     and      pas.assignment_id   <>      l_assignment_id
     and      p_effective_date    between pas.effective_start_date
                                  and     pas.effective_end_date;
Line: 5949

        else -- inserting a non applicant
          --
          hr_utility.set_message(800, 'HR_289620_APPLICANT_RANK_ASG');
Line: 5990

    select posting_content_id
    from irc_posting_contents
    where posting_content_id = p_posting_content_id
    and rownum = 1;
Line: 6049

        else -- inserting a non applicant
          --
          hr_utility.set_message(800, 'HR_289619_POSTING_CONTENT_ASG');