DBA Data[Home] [Help]

APPS.PAY_GB_EOY SQL Statements

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

Line: 132

SELECT UPPER(a.permit_number)
    ,a.payroll_id
    ,TO_CHAR(a.tax_district_reference)
    ,UPPER(a.tax_reference_number)
    ,UPPER(a.tax_district_name)
    ,NVL(TO_CHAR(a.tax_year-1),'?')
    ,UPPER(a.employers_name)
    ,UPPER(a.employers_address_line)
    ,UPPER(NVL(a.econ,'?'))
    ,nvl(ssp_recovered,0)
    ,nvl(smp_recovered,0)
    ,nvl(smp_compensation,0)
FROM pay_gb_year_end_payrolls a
WHERE a.permit_number = NVL(cp_permit_no,a.permit_number)
AND   a.tax_reference_number =
                NVL(cp_tax_ref_no,a.tax_reference_number)
AND   a.tax_district_reference =
			          NVL(cp_tax_dist_ref,a.tax_district_reference)
AND   a.business_group_id = NVL(cp_business_group_id,
			                           a.business_group_id)
AND EXISTS (SELECT '1'
      FROM pay_gb_year_end_assignments b
      WHERE a.payroll_id = b.payroll_id)
ORDER BY a.permit_number,a.payroll_id;
Line: 158

      SELECT SUBSTR(UPPER(a.assignment_number),1,14)
        ,NVL(UPPER(a.last_name),' ')
        ,UPPER(SUBSTR(a.first_name,1,7))
        ,UPPER(a.middle_name)
        ,NVL(fnd_date.date_to_canonical(a.date_of_birth),' ')
        ,NVL(UPPER(a.sex),' ')
        ,decode(a.address_line1,'','',rpad(upper(a.address_line1),27))
        ,decode(a.address_line2,'','',rpad(upper(a.address_line2),27))
        ,ltrim(rpad(UPPER(NVL(a.town_or_city,a.address_line3)),27))
        ,decode(a.county,'','',rpad(UPPER(a.county),27))
        ,NVL(UPPER(a.postal_code),' ')
        ,NVL(UPPER(a.tax_code),' ')
        ,NVL(UPPER(a.w1_m1_indicator),' ')
        ,NVL(UPPER(a.national_insurance_number), ' ')
        ,NVL(a.ssp,0)
        ,NVL(a.smp,0)
        ,NVL(a.gross_pay,0)
        ,decode(a.tax_refund, 'R', NVL(-1*a.tax_paid,0), NVL(a.tax_paid,0))
        ,NVL(UPPER(a.tax_refund),' ')
        ,NVL(a.previous_taxable_pay,0)
        ,NVL(a.previous_tax_paid,0)
        ,NVL(fnd_date.date_to_canonical(a.start_of_emp),' ')
        ,fnd_date.date_to_canonical(a.termination_date)
        ,100*(NVL(TRUNC(a.superannuation_paid/100),0))
        ,NVL(UPPER(a.superannuation_refund),' ')
        ,NVL(ROUND(a.widows_and_orphans/100),0)
        ,NVL(UPPER(a.week_53_indicator),' ')
        ,NVL(a.taxable_pay,0)
        ,NVL(UPPER(a.pensioner_indicator),' ')
        ,NVL(UPPER(a.director_indicator),' ')
        ,a.assignment_id
        ,a.effective_end_date
      FROM pay_gb_year_end_assignments a
		WHERE a.payroll_id    = cp_payroll_id
		ORDER BY a.last_name, a.first_name;
Line: 196

		 SELECT NVL(UPPER(a.scon),' ')                scon
		       ,UPPER(a.ni_category_code)             cat_code
		       ,NVL(TRUNC(a.earnings/100),0)          earnings
		       ,NVL(a.total_contributions,0)         tot_cont
		       ,NVL(a.employees_contributions,0)      emps_cont
		       ,NVL(TRUNC(a.earnings_contracted_out/100),0) earnings_out
		       ,NVL(a.contributions_contracted_out,0) cont_out
      FROM pay_gb_year_end_values a
		  WHERE a.assignment_id      = cp_assignment_id
		  AND   a.effective_end_date = cp_effective_date
		  AND   a.reportable        <> 'N';
Line: 212

          SELECT '1'
          FROM pay_gb_year_end_values a
	       WHERE a.ni_category_code IN ('D','E')
	       AND (a.assignment_id,a.effective_end_date) IN
            (SELECT b.assignment_id,b.effective_end_date
		      FROM pay_gb_year_end_assignments b
		          ,pay_gb_year_end_payrolls    c
            WHERE c.permit_number = NVL(cp_permit_no, c.permit_number)
		        AND   c.tax_reference_number =
                           NVL(cp_tax_ref_no,c.tax_reference_number)
		        AND c.tax_district_reference =
                           NVL(cp_tax_dist_ref,c.tax_district_reference)
              AND c.business_group_id    = NVL(cp_business_group_id,
		                                           c.business_group_id)
              AND   c.payroll_id            = b.payroll_id
		        AND   rownum < 5);
Line: 232

CURSOR form IS SELECT a.formula_id
	       FROM   ff_formulas_f a,
                      ff_formula_types t
	       WHERE a.formula_name = p_formula_name
                 AND a.formula_type_id = t.formula_type_id
                 AND t.formula_type_name = 'Oracle Payroll';
Line: 1234

	-- Index in PL/SQL tables set to the last record selected
	g_last_ni     := 4;