DBA Data[Home] [Help]

APPS.PAY_CA_RL1_REG SQL Statements

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

Line: 137

  select user_entity_id
  from   ff_database_items
  where  user_name = p_user_name;
Line: 164

   select legislative_parameters
     into leg_param
     from pay_payroll_actions ppa
    where ppa.payroll_action_id = pactid;
Line: 172

   sqlstr := 'select distinct to_number(fai3.value)
                from    ff_archive_items fai1,
                        ff_archive_items fai2,
                        ff_database_items fdi1,
                        ff_database_items fdi2,
                        ff_archive_items fai3,
                        ff_database_items fdi3,
			pay_payroll_actions     ppa,
                        pay_assignment_actions  paa
              where  ppa.payroll_action_id    = :payroll_action_id
                 and    fai1.user_entity_id = fdi1.user_entity_id
                 and    fdi1.user_name      = ''CAEOY_TAXATION_YEAR''
                 and    fai1.value =
                 	nvl(pay_ca_rl1_reg.get_parameter(''TAX_YEAR'',
                                                         ppa.legislative_parameters),fai1.value)
                 and    fai2.user_entity_id = fdi2.user_entity_id
                 and    fdi2.user_name      = ''CAEOY_RL1_PRE_ORG_ID''
                 and    fai2.value           =
                  nvl(pay_ca_rl1_reg.get_parameter(''PRE_ORGANIZATION_ID'',
                                                   ppa.legislative_parameters),
                                                   fai2.value)
                 and    fai1.context1        = fai2.context1
                 and    paa.payroll_action_id= fai2.context1
                 and    paa.assignment_action_id=fai3.context1
                 and    fai3.user_entity_id = fdi3.user_entity_id
                 and    fdi3.user_name = ''CAEOY_PERSON_ID''
                 and    fai3.value  = nvl(pay_ca_rl1_reg.get_parameter(''PER_ID'',
                                          ppa.legislative_parameters),fai3.value)
		 order by to_number(fai3.value)';
Line: 243

   select pycadar_pkg.get_parameter('PRE_ORGANIZATION_ID',
          ppa.legislative_parameters )
    from pay_payroll_actions ppa
   where ppa.report_type       = 'RL1'
   and   ppa.report_qualifier  = 'CAEOYRL1'
   and   ppa.report_category   = 'CAEOYRL1'
   and   ppa.effective_date    = l_year_end
   and   ppa.start_date        = l_year_start
   and   ppa.business_group_id = l_bus_group_id
   and   ppa.action_status     = 'C';
Line: 257

   select paa.assignment_action_id,
          ppa.payroll_action_id
   from pay_payroll_actions ppa,
        pay_assignment_actions paa
   where ppa.report_type       = 'RL1'
   and   ppa.report_qualifier  = 'CAEOYRL1'
   and   ppa.report_category   = 'CAEOYRL1'
   and   ppa.effective_date    = l_year_end
   and   ppa.start_date        = l_year_start
   and   ppa.business_group_id = l_bus_group_id
   and   ppa.action_status     = 'C'
   and   ppa.payroll_action_id = paa.payroll_action_id
   and   paa.serial_number     = to_char(cp_person_id)
   and   pycadar_pkg.get_parameter('PRE_ORGANIZATION_ID',
          ppa.legislative_parameters) = cp_pre_org_id
   and   paa.assignment_id     = cp_assignment_id;
Line: 275

   select distinct organization_id
   from hr_organization_information hoi
   where hoi.org_information_context = 'Canada Employer Identification'
   and  hoi.org_information2         = p_pre_org_id;
Line: 284

    select distinct paf.person_id,
                    paf.assignment_id  assignment_id
    from per_people_f ppf,
         per_assignments_f paf
    where ppf.person_id between stperson and endperson
    and   ppf.effective_start_date  <= l_year_end
    and   ppf.effective_end_date    >= l_year_start
    and   paf.person_id = ppf.person_id
    and   paf.effective_start_date  <= l_year_end
    and   paf.effective_end_date    >= l_year_start
    and   paf.assignment_type = 'E'
    and   paf.business_group_id + 0 = l_business_group_id
    order by 1,2;
Line: 302

    select distinct paf.person_id,
                    paf.assignment_id  assignment_id
    from per_people_f ppf,
         per_assignments_f paf
    where ppf.person_id between stperson and endperson
    and   ppf.effective_start_date  <= l_year_end
    and   ppf.effective_end_date    >= l_year_start
    and   paf.person_id = ppf.person_id
    and   ppf.person_id = to_number(l_per_id)
    and   paf.effective_start_date  <= l_year_end
    and   paf.effective_end_date    >= l_year_start
    and   paf.assignment_type = 'E'
    and   paf.business_group_id + 0 = l_business_group_id
    order by 1,2;
Line: 323

    select distinct paf.person_id,
                    paf.assignment_id  assignment_id
    from per_people_f ppf,
	 per_assignments_f paf
    where ppf.person_id between stperson and endperson
    and   ppf.effective_start_date  <= l_year_end
    and   ppf.effective_end_date    >= l_year_start
    and   paf.person_id = ppf.person_id
    and   paf.effective_start_date  <= l_year_end
    and   paf.effective_end_date    >= l_year_start
    and   paf.assignment_type = 'E'
    and   paf.business_group_id +0 = l_business_group_id
    and   exists ( select 1 /* Selected Assignment Set */
                   from   hr_assignment_set_amendments hasa
                   where  hasa.assignment_set_id   = l_asg_set_id
                   and    hasa.assignment_id         = paf.assignment_id
                   and    upper(hasa.include_or_exclude) = 'I')
    order by 1,2;
Line: 343

    select assignment_id
    from per_assignments_f paf
    where person_id = p_person_id
    and   primary_flag = 'Y'
    and   assignment_type = 'E'
    and   paf.effective_start_date  <= l_year_end
    and   paf.effective_end_date    >= l_year_start
    order by assignment_id desc;
Line: 358

     select effective_date,
            report_type,
            business_group_id,
            legislative_parameters
     into   l_effective_date,
            l_report_type,
            l_bus_group_id,
            l_legislative_parameters
     from pay_payroll_actions
     where payroll_action_id = pactid;
Line: 471

                       select pay_assignment_actions_s.nextval
                       into   lockingactid
                       from   dual;
Line: 491

                        update pay_assignment_actions paa
                        set paa.serial_number = lv_serial_number
                        where paa.assignment_action_id = lockingactid;
Line: 592

                         select pay_assignment_actions_s.nextval
                         into   lockingactid
                         from   dual;
Line: 611

                         update pay_assignment_actions paa
                         set paa.serial_number = lv_serial_number
                         where paa.assignment_action_id = lockingactid;
Line: 650

      sqlstr :=  'select paa1.rowid   /* we need the row id of the assignment actions that are created by PYUGEN */
                   from hr_all_organization_units  hou1,
                        hr_all_organization_units  hou,
                        hr_locations_all  	   loc,
			per_all_people_f           ppf,
                        per_all_assignments_f      paf,
                        pay_assignment_actions     paa1,
                        pay_payroll_actions        ppa1
		   where ppa1.payroll_action_id = :pactid
		   and   paa1.payroll_action_id = ppa1.payroll_action_id
		   and   paa1.assignment_id = paf.assignment_id
                   and   paf.business_group_id = ppa1.business_group_id
                   and   paf.effective_start_date <= ppa1.effective_date
  		   and   hou.organization_id = paa1.tax_unit_id
		   and   loc.location_id  = paf.location_id
		   and   hou1.organization_id  = paf.organization_id
		   and   ppf.person_id = paf.person_id
		   and   ppa1.effective_date between
		         ppf.effective_start_date and ppf.effective_end_date
                   and   paf.effective_end_date =
                          (select max(paaf2.effective_end_date)
                           from per_all_assignments_f paaf2
                           where paaf2.assignment_id = paf.assignment_id
                           and paaf2.effective_start_date <= ppa1.effective_date)
    order by
      decode(pay_ca_rl1_reg.get_parameter(''P_S1'',ppa1.legislative_parameters),
                            ''RL1_PRE'',hou.name,
                            ''RL1_ORG'',hou1.name,
                            ''RL1_LOC'',loc.location_code,null)
     ,decode(pay_ca_rl1_reg.get_parameter(''P_S2'',ppa1.legislative_parameters),
                            ''RL1_PRE'',hou.name,
                            ''RL1_ORG'',hou1.name,
                            ''RL1_LOC'',loc.location_code,null)
     ,decode(pay_ca_rl1_reg.get_parameter(''P_S3'',ppa1.legislative_parameters),
                            ''RL1_PRE'',hou.name,
                            ''RL1_ORG'',hou1.name,
                            ''RL1_LOC'',loc.location_code,null)
     ,ppf.last_name,ppf.first_name';
Line: 791

    select addr.address_line1
           ,addr.address_line2
           ,addr.address_line3
           ,rtrim(substr(addr.town_or_city,1,23))  ||' '||
            decode(addr.country, 'CA', addr.region_1, 'US', addr.region_2,
                   addr.region_1 )
            ||' '|| addr.country  -- Bug 4134616
            ||' '|| addr.postal_code address_line4
           ,addr.country address_line5 -- Country Code
           ,country.territory_short_name address_line6 -- Country Name
           ,addr.town_or_city Town_or_City
           ,decode(addr.country, 'CA', addr.region_1,
                                 'US', addr.region_2, addr.region_1 ) Province
           ,addr.postal_code Postal_Code
    from   per_addresses             addr
          ,fnd_territories_vl country
    where  addr.person_id      = p_person_id
    and    addr.primary_flag   = 'Y'
/* Added the trunc function by ssmukher for Bug 4205724 */
    and    trunc(p_effective_date) between
                      addr.date_from and nvl(addr.date_to, trunc(p_effective_date))
    and    country.territory_code = addr.country;
Line: 831

select meaning
from hr_lookups
where lookup_type = p_lookup_type
and   lookup_code = p_lookup_code;
Line: 855

select 1 ord, meaning
from  fnd_lookup_values
where lookup_type = p_lookup_type
and   lookup_code = p_lookup_code
and ( ( p_person_language is null and language = 'US' ) or
      ( p_person_language is not null and language = p_person_language ) )
union all
select 2 ord, meaning
from  fnd_lookup_values
where lookup_type = p_lookup_type
and   lookup_code = p_lookup_code
and ( language = 'US' and p_person_language is not null
      and language <> p_person_language )
order by 1;