DBA Data[Home] [Help]

APPS.PAY_GB_P11D_MILEAGE_EXTRACT SQL Statements

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

Line: 62

      SELECT  business_group_id
      FROM    per_all_assignments_f
      WHERE   assignment_id = p_asg_id;
Line: 272

   SELECT payroll_id
   FROM   pay_all_payrolls_f
   WHERE  payroll_name = l_payroll_name
   AND    nvl(business_group_id, p_bus_group_id) = p_bus_group_id
   AND    ben_ext_person.g_effective_Date BETWEEN effective_start_date AND effective_end_Date;
Line: 345

   SELECT person_id
   FROM   per_all_people_f
   WHERE  employee_number = l_employee_number
   AND    nvl(business_group_id, p_bus_group_id) = p_bus_group_id
   AND    ben_ext_person.g_effective_Date BETWEEN effective_start_date AND effective_end_Date;
Line: 386

   SELECT consolidation_set_id
   FROM   pay_consolidation_sets
   WHERE  consolidation_Set_name = l_consolidation_set
   AND    nvl(business_group_id, p_bus_group_id) = p_bus_group_id;
Line: 427

   SELECT assignment_set_id
   FROM   hr_assignment_sets
   WHERE  assignment_set_name = l_assignment_set
   AND    nvl(business_group_id, p_bus_group_id) = p_bus_group_id;
Line: 481

   SELECT min(effective_start_date) min_start_date, max(effective_end_date) max_end_date
   FROM   per_all_assignments_f
   WHERE  assignment_id = p_asg_id;
Line: 489

   SELECT pp.payroll_id, asg.person_id, pp.consolidation_set_id, flex.segment1 tax_dist
   FROM   pay_all_payrolls_f pp,
          per_all_assignments_f asg,
          hr_soft_coding_keyflex flex
   WHERE  asg.assignment_id = p_asg_id
   AND    asg.payroll_id = pp.payroll_id
   AND    ben_ext_person.g_effective_date BETWEEN pp.effective_start_date AND pp.effective_end_date
   AND    pp.soft_coding_keyflex_id = flex.soft_coding_keyflex_id
   AND    asg.effective_start_date < l_ext_end_date
   AND    asg.effective_end_date > ben_start_date(p_asg_id);
Line: 501

   SELECT 'Y' include_flag
   FROM   hr_assignment_set_amendments hasa,
          hr_assignment_sets has,
          per_all_assignments_f paaf
   WHERE  has.assignment_set_id = l_ext_asg_set_id
   AND    paaf.assignment_id = p_asg_id
--   AND    ben_ext_person.g_effective_date BETWEEN paaf.effective_start_date AND paaf.effective_end_date
   AND    has.assignment_set_id = hasa.assignment_set_id (+)
   AND    NVL (hasa.assignment_id, paaf.assignment_id) = paaf.assignment_id
   AND    NVL (hasa.include_or_exclude, 'I') = 'I'
   AND    NVL (has.payroll_id, paaf.payroll_id) = paaf.payroll_id;
Line: 620

    select max(paa.assignment_action_id)
    from per_time_periods ptp,
         pay_payroll_actions pact,
         pay_assignment_actions paa
    where paa.assignment_id = p_assignment_id
    and paa.payroll_action_id = pact.payroll_action_id
    and pact.time_period_id = ptp.time_period_id
    and pact.action_type in ('Q','R','B','I','V')
    --and paa.action_status = 'C'
    and paa.action_status in ('C','S')    --Modified for the bug 10066755
    and pact.effective_date <= p_ext_end_date
    and ptp.regular_payment_date between p_ben_start_date
                                 and p_ext_end_date;
Line: 669

    select max(paa.assignment_action_id)
    from per_time_periods ptp,
         pay_payroll_actions pact,
         pay_assignment_actions paa
    where paa.assignment_id = p_assignment_id
    and paa.payroll_action_id = pact.payroll_action_id
    and pact.time_period_id = ptp.time_period_id
    and pact.action_type in ('Q','R','B','I','V')
    --and paa.action_status = 'C'
    and paa.action_status in ('C','S')    --Modified for the bug 10066755
    and pact.effective_date <= p_tax_year_end_date
    and ptp.regular_payment_date between p_ben_start_date
                                 and p_tax_year_end_date;
Line: 751

    select greatest(pps.date_start, l_tax_year_start)
    from per_periods_of_service pps,
         per_all_assignments_f paf
    where paf.period_of_service_id = pps.period_of_service_id
    and paf.assignment_id = p_assignment_id;
Line: 797

    select least(nvl(pps.actual_termination_date,hr_general.end_of_time),
                 l_tax_year_end)
    from   per_periods_of_service pps,
           per_all_assignments_f paf
    where  paf.period_of_service_id = pps.period_of_service_id
    and    paf.assignment_id = p_assignment_id;
Line: 843

    select greatest(min(paf.effective_start_date),l_tax_year_start)
    from per_all_assignments_f paf
    where paf.assignment_id = p_assignment_id;
Line: 887

    select least(max(paf.effective_end_date),l_tax_year_end)
    from per_all_assignments_f paf,
         per_assignment_status_types past
    where paf.assignment_id = p_assignment_id
    and   past.per_system_status = 'ACTIVE_ASSIGN'
    and   paf.assignment_status_type_id = past.assignment_status_type_id;
Line: 940

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name = 'Mileage Odd Taxable Amt'
    and pbd.dimension_name = '_ASG_YTD';
Line: 950

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name = 'Mileage Even Taxable Amt'
    and pbd.dimension_name = '_ASG_YTD';
Line: 1092

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name = 'Addl Pasg Odd Taxable Amt'
    and pbd.dimension_name = '_ASG_YTD';
Line: 1102

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name = 'Addl Pasg Even Taxable Amt'
    and pbd.dimension_name = '_ASG_YTD';
Line: 1240

	  select 1 from dual;
Line: 1246

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name in ('Car Casual Odd Actual Miles',
                            'Motorcycle Casual Odd Actual Miles',
														'Pedalcycle Casual Odd Actual Miles',
														'Car Essential Odd Actual Miles',
														'Motorcycle Essential Odd Actual Miles',
														'Pedalcycle Essential Odd Actual Miles')
	and pbd.dimension_name = '_ASG_TD_YTD';
Line: 1261

    select pdb.defined_balance_id
    from pay_balance_types pbt,
         pay_defined_balances pdb,
         pay_balance_dimensions pbd
    where pbt.balance_type_id = pdb.balance_type_id
    and pdb.balance_dimension_id = pbd.balance_dimension_id
    and pbt.balance_name in ('Car Casual Even Actual Miles',
														'Motorcycle Casual Even Actual Miles',
														'Pedalcycle Casual Even Actual Miles',
														'Car Essential Even Actual Miles',
														'Motorcycle Essential Even Actual Miles',
														'Pedalcycle Essential Even Actual Miles')
and pbd.dimension_name = '_ASG_TD_YTD';
Line: 1416

   SELECT greatest(min(paaf.effective_start_date), l_ext_start_date) effective_start_date,
          least(max(paaf.effective_end_date), l_ext_end_date) effective_end_date
   FROM   pqp_vehicle_allocations_f paaf,
          pqp_vehicle_repository_f pvd
   WHERE  paaf.assignment_id = p_asg_id
   AND    paaf.effective_start_date <= l_ext_end_date
   AND    paaf.effective_end_date >= l_ext_start_date
   AND    paaf.vehicle_repository_id is NOT NULL
   AND    pvd.vehicle_repository_id = paaf.vehicle_repository_id
   AND    pvd.vehicle_type  = 'C'
   ORDER BY paaf.effective_start_date ;
Line: 1484

   SELECT greatest(min(paaf.effective_start_date), l_ext_start_date) effective_start_date,
          least(max(paaf.effective_end_date), l_ext_end_date) effective_end_date
   FROM   pqp_vehicle_allocations_f paaf,
          pqp_vehicle_repository_f pvd
   WHERE  paaf.assignment_id = p_asg_id
   AND    paaf.effective_start_date <= l_ext_end_date
   AND    paaf.effective_end_date >= l_ext_start_date
   AND    paaf.vehicle_repository_id is NOT NULL
   AND    pvd.vehicle_repository_id = paaf.vehicle_repository_id
   AND    pvd.vehicle_type  = 'M'
   ORDER BY paaf.effective_start_date ;
Line: 1553

   SELECT greatest(min(paaf.effective_start_date), l_ext_start_date) effective_start_date,
          least(max(paaf.effective_end_date), l_ext_end_date) effective_end_date
   FROM   pqp_vehicle_allocations_f paaf,
          pqp_vehicle_repository_f pvd
   WHERE  paaf.assignment_id = p_asg_id
   AND    paaf.effective_start_date <= l_ext_end_date
   AND    paaf.effective_end_date >= l_ext_start_date
   AND    paaf.vehicle_repository_id is NOT NULL
   AND    pvd.vehicle_repository_id = paaf.vehicle_repository_id
   AND    pvd.vehicle_type  = 'P'
   ORDER BY paaf.effective_start_date ;
Line: 1616

   SELECT distinct paa1.assignment_id
   FROM   per_all_assignments_f paa1, per_all_assignments_f paa2
   WHERE  paa2.assignment_id = p_asg_id
   AND    paa2.person_id = paa1.person_id
   AND    nvl(paa1.primary_flag, 'N') = 'N';
Line: 1682

   SELECT distinct paa1.assignment_id
   FROM   per_all_assignments_f paa1, per_all_assignments_f paa2
   WHERE  paa2.assignment_id = p_asg_id
   AND    paa2.person_id = paa1.person_id
   AND    paa1.effective_end_date < paa2.effective_start_date
--   AND    paa1.period_of_service_id <> paa2.period_of_service_id
   AND    nvl(paa1.primary_flag, 'Y') = 'Y';
Line: 1747

   SELECT rcd.ext_rcd_id
   FROM   ben_ext_rcd rcd,
          ben_ext_rcd_in_file rif,
          ben_ext_dfn dfn,
          ben_ext_rslt rslt
   WHERE  rslt.ext_rslt_id = p_ext_rslt_id
   AND    rslt.ext_dfn_id = dfn.ext_dfn_id
   AND    dfn.ext_file_id = rif.ext_file_id
   AND    rif.ext_rcd_id = rcd.ext_rcd_id
--   AND    rcd.name like '%PAY GB P11D Mileage Extract 2003 - Assignment Details Record';
Line: 1763

   SELECT rcd.ext_rcd_id
   FROM   ben_ext_rcd rcd,
          ben_ext_rcd_in_file rif,
          ben_ext_dfn dfn,
          ben_ext_rslt rslt
   WHERE  rslt.ext_rslt_id = p_ext_rslt_id
   AND    rslt.ext_dfn_id = dfn.ext_dfn_id
   AND    dfn.ext_file_id = rif.ext_file_id
   AND    rif.ext_rcd_id = rcd.ext_rcd_id
--   AND    rcd.name like '%PAY GB P11D Mileage Extract 2003 - Mileage and Passenger Record';
Line: 1778

   SELECT person_id, val_01 asg_id, ext_rslt_dtl_id, object_version_number
   FROM   ben_ext_rslt_dtl
   WHERE  ext_rslt_id = p_ext_rslt_id
   AND    ext_rcd_id = l_asg_rcd_id;
Line: 1786

   SELECT *
   FROM   ben_ext_rslt_dtl
   WHERE  ext_rslt_id = p_ext_rslt_id
   AND    ext_rcd_id = g_veh_rcd_id
   AND    person_id = p_person_id;
Line: 1845

         ben_ext_rslt_dtl_api.delete_ext_rslt_dtl(p_ext_rslt_dtl_id => l_balance_detail.ext_rslt_dtl_id,
                                                  p_object_version_number => l_balance_detail.object_version_number);
Line: 1856

         ben_ext_rslt_dtl_api.delete_ext_rslt_dtl(p_ext_rslt_dtl_id => l_balance_detail.ext_rslt_dtl_id,
                                                  p_object_version_number => l_balance_detail.object_version_number);
Line: 1874

        ben_ext_rslt_dtl_api.delete_ext_rslt_dtl(p_ext_rslt_dtl_id => ext_asg_rec.ext_rslt_dtl_id,
                                               p_object_version_number => l_obj_no);
Line: 1905

   SELECT distinct paa1.assignment_id
   FROM   per_all_assignments_f paa1, per_all_assignments_f paa2
   WHERE  paa2.assignment_id = p_assignment_id
   AND    paa2.person_id = paa1.person_id
   ORDER BY paa1.assignment_id;
Line: 1946

   SELECT 1
   FROM   pqp_vehicle_allocations_f paaf,
          pqp_vehicle_repository_f pvd
   WHERE  paaf.assignment_id = p_assignment_id
   AND    paaf.effective_start_date <= c_ext_end_date
   AND    paaf.effective_end_date >= c_ext_start_date
   AND    paaf.vehicle_repository_id is NOT NULL
   AND    pvd.vehicle_repository_id = paaf.vehicle_repository_id
   AND    pvd.vehicle_type  in ('C','M','P')
   ORDER BY paaf.effective_start_date ;
Line: 2327

		    'select pdb.defined_balance_id,
		            pbt.balance_name
				   from pay_balance_types pbt,
		            pay_defined_balances pdb,
		            pay_balance_dimensions pbd
  		    where pbt.balance_type_id = pdb.balance_type_id
	     	    and pdb.balance_dimension_id = pbd.balance_dimension_id
        		and pbd.dimension_name = '||'''_ASG_TD_YTD'''||
        	 'and pbt.balance_name in ' || p_bal_string ;