DBA Data[Home] [Help]

APPS.PAY_US_GEOCODE_REPORT_PKG SQL Statements

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

Line: 176

                  ,p_table_updated             in varchar2
                  ,p_error_description         in varchar2
                  ,p_output_file_type          in varchar2
                  ,p_static_data1              out nocopy varchar2
             )
  IS

    lv_format1 VARCHAR2(32000);
Line: 240

       if p_table_updated is not NULL then
           lv_format1 := lv_format1 ||
              formated_data_string (p_input_string => p_table_updated
                                   ,p_output_file_type => p_output_file_type);
Line: 342

         select distinct substr(ppf.full_name,1,40)  ,
                 pef.assignment_id   ,
                 substr(pef.assignment_number,1,17) ,
                 substr(pgu.description,1,65)
          from   per_people_f ppf,
                 per_assignments_f pef,
                 pay_us_geo_update pgu,
                 pay_patch_status pps
          where    pef.assignment_id = pgu.assignment_id
          and    ppf.person_id = pef.person_id
          and    pgu.id = pps.id
          and    pps.patch_name = p_geocode_patch_name
          and    pgu.status = 'P'
          and    pgu.process_mode = p_process_mode;
Line: 382

      'THIS IS A LIST OF ASSIGNMENT INFORMATION FOR THE GEOCODE UPDATE QUARTERLY PATCH'
                                         ,p_output_file_type
                                         ));
Line: 542

         select distinct substr(ppf.full_name,1,40) ,
                 pef.assignment_id ,
                 substr(pef.assignment_number,1,17)
          from   per_people_f ppf,
                 per_assignments_f pef,
                 pay_us_geo_update pgu,
        	 pay_patch_status pps
          where  pgu.process_type = 'PERCENTAGE_OVER_100'
          and    pef.assignment_id = pgu.assignment_id
          and    ppf.person_id = pef.person_id
          and    pgu.process_mode = p_process_mode
          and    pgu.id = pps.id
          and    pps.patch_name = p_geocode_patch_name;
Line: 727

  select distinct substr(ppf.full_name,1,40) ,
                 pef.assignment_id ,
                 substr(pef.assignment_number,1,17)
  from   per_people_f ppf,
         per_assignments_f pef,
         pay_us_geo_update pgu,
         pay_patch_status pps
  where  pgu.process_type = 'MISSING_COUNTY_RECORDS'
  and    pef.assignment_id = pgu.assignment_id
  and    ppf.person_id = pef.person_id
  and    pgu.process_mode = cp_process_mode
  and    pgu.id = pps.id
  and    pps.patch_name = cp_geocode_patch_name;
Line: 905

  select /*+ index(pmod PAY_US_MODIFIED_GEOCODES_PK)*/  -- Bug 3350007
         distinct substr(ppf.full_name,1,40) ,
         pef.assignment_id ,
         substr(pef.assignment_number,1,17),
         pgu.new_juri_code ,
         substr(pusc.city_name,1,20),
         pgu.old_juri_code,
         substr(pmod.city_name,1,20),
         substr(pgu.table_name ,1,20)
  from   pay_us_modified_geocodes pmod,
         pay_us_city_names pusc ,
	 pay_patch_status pps,
         per_people_f ppf,
         per_assignments_f pef,
         pay_us_geo_update pgu
  where  pgu.process_type = 'PU'
  and    pef.assignment_id = pgu.assignment_id
  and    ppf.person_id = pef.person_id
  and    pgu.table_name is not null
  and    substr(new_juri_code,1,2) = pmod.state_code
  and    substr(new_juri_code,4,3) = pmod.county_code
  and    substr(new_juri_code,8,4) = pmod.new_city_code
  and    substr(old_juri_code,8,4) = pmod.old_city_code
  and    pmod.process_type = 'PU'
  and    pusc.city_code = substr(new_juri_code,8,4)
  and    pusc.county_code = substr(new_juri_code,4,3)
  and    pusc.state_code = substr(new_juri_code,1,2)
  and    pusc.primary_flag = 'Y'
  and    pgu.process_mode = cp_process_mode
  and    pgu.id = pps.id
  and    pps.patch_name = cp_geocode_patch_name;
Line: 975

                                         'Employees who have records updated in the following tables because'
                                         ,p_output_file_type
                                         ));
Line: 1036

              formated_data_string (p_input_string =>  'Table Updated'
                                   ,p_bold         => 'Y'
                                   ,p_output_file_type => p_output_file_type)
              ;
Line: 1144

  select distinct substr(ppf.full_name,1,40) ,
         pef.assignment_id "Assignment Id" ,
         substr(pef.assignment_number,1,17),
         substr(pusc.city_name,1,20),
         old_juri_code "Old JD",
         new_juri_code "New JD",
         substr(table_name,1,20)
  from   per_people_f ppf,
         per_assignments_f pef,
         pay_us_geo_update pgu,
         pay_us_city_names pusc,
	 pay_patch_status pps
  where  pgu.process_type = 'UP'
  and    pgu.table_name is not null
  and    pef.assignment_id = pgu.assignment_id
  and    ppf.person_id = pef.person_id
  and    pusc.city_code = substr(new_juri_code,8,4)
  and    pusc.county_code = substr(new_juri_code,4,3)
  and    pusc.state_code = substr(new_juri_code,1,2)
  and    pusc.primary_flag = 'Y'
  and    pgu.process_mode = p_process_mode
  and    pgu.id = pps.id
  and    pps.patch_name = p_geocode_patch_name;
Line: 1206

                                         'Employees whose records have been updated in the following tables'
                                         ,p_output_file_type
                                         ));
Line: 1253

             formated_data_string (p_input_string =>  'Table Updated'
                                   ,p_bold         => 'Y'
                                   ,p_output_file_type => p_output_file_type)
              ;
Line: 1360

  select distinct substr(ppf.full_name,1,40) ,
         pef.assignment_id "Assignment Id" ,
         substr(pef.assignment_number,1,17),
         substr(pusc.city_name,1,20),
    	 substr(puscn.county_name,1,20),
         substr(pust.state_abbrev,1,2),
	     old_juri_code ,
         new_juri_code
   from  per_people_f ppf,
         per_assignments_f pef,
         pay_us_geo_update pgu,
         pay_us_city_names pusc,
	 pay_patch_status pps ,
	 pay_us_states pust,
	 pay_us_counties puscn
  where  pgu.process_type = 'US'
  and    pgu.status = 'A'
  and    pgu.table_name is null
  and    pef.assignment_id = pgu.assignment_id
  and    ppf.person_id = pef.person_id
  and    pusc.city_code = substr(new_juri_code,8,4)
  and    pusc.county_code = substr(new_juri_code,4,3)
  and    pusc.state_code = substr(new_juri_code,1,2)
  and    puscn.county_code = pusc.county_code
  and    puscn.state_code = pusc.state_code
  and    pust.state_code = pusc.state_code
  and    pusc.primary_flag = 'Y'
  and    pgu.process_mode = cp_process_mode
  and    pgu.id = pps.id
  and    pps.patch_name = cp_geocode_patch_name;
Line: 1632

        SELECT  /*+ ORDERED
                    INDEX (PAY_US_MODIFIED_GEOCODES PAY_US_MODIFIED_GEOCODES_N1)
                    INDEX (PAY_US_CITY_NAMES  PAY_US_CITY_NAMES_FK1)
                    INDEX (PAY_US_EMP_CITY_TAX_RULES_F PAY_US_EMP_CITY_TAX_RULES_N3)   */
                 SUBSTR(ppf.full_name,1,40),
                 SUBSTR(pmod.city_name,1,20),
                 SUBSTR(pucn.city_name,1,20)
          FROM   pay_us_modified_geocodes pmod,
                 pay_us_city_names pucn,
                 pay_us_emp_city_tax_rules_f ectr,
                 per_assignments_f paf,
                 per_people_f ppf
         WHERE pmod.process_type = 'P'
           AND pmod.state_code = pucn.state_code
           AND pmod.county_code = pucn.county_code
           AND pmod.new_city_code = pucn.city_code
           AND pucn.primary_flag = 'Y'
           AND pmod.state_code = ectr.state_code
           AND pmod.county_code = ectr.county_code
           AND pmod.old_city_code = ectr.city_code
           AND ectr.assignment_id = paf.assignment_id
           AND paf.person_id = ppf.person_id
           AND pmod.patch_name = cp_geocode_patch_name
        union all
          SELECT /*+ ORDERED
                     INDEX (PAY_US_MODIFIED_GEOCODES PAY_US_MODIFIED_GEOCODES_N1)
                     INDEX (PAY_US_CITY_NAMES  PAY_US_CITY_NAMES_FK1)
                     INDEX (PAY_US_EMP_CITY_TAX_RULES_F PAY_US_EMP_CITY_TAX_RULES_N3) */
                 SUBSTR(ppf.full_name,1,40),
                 SUBSTR(pucn.city_name,1,20),
                 SUBSTR(pmod.city_name,1,20)
          FROM   pay_us_modified_geocodes pmod,
                 pay_us_city_names pucn,
                 pay_us_emp_city_tax_rules_f ectr,
                 per_assignments_f paf,
                 per_people_f ppf,
                 hr_s_us_city_names pmod2
           WHERE pmod.process_type = 'S'
             AND pmod.state_code = pucn.state_code
             AND pmod.county_code = pucn.county_code
             AND pmod.new_city_code = pucn.city_code
             AND pucn.city_name = pmod2.city_name
             and pmod2.state_code = ectr.state_code
             and pmod2.county_code = ectr.county_code
             and pmod2.city_code = ectr.city_code
             and pmod2.primary_flag = 'Y'
             and pmod2.city_name = pmod.city_name
             AND pmod.state_code = ectr.state_code
             AND pmod.county_code = ectr.county_code
             AND pmod.old_city_code = ectr.city_code
             AND ectr.assignment_id = paf.assignment_id
             AND paf.person_id = ppf.person_id
             AND pmod.patch_name = cp_geocode_patch_name;
Line: 1851

        select state_code||'-'||county_code||'-'||old_city_code ,
               state_code||'-'||county_code||'-'||new_city_code ,
               substr(city_name,1,20)
          from pay_us_modified_geocodes
         where old_city_code like 'U%';
Line: 2018

         select /*+ ORDERED
                   INDEX (PAY_US_GEO_UPDATE PAY_US_GEO_UPDATE_N2)
                   INDEX (PAY_PATCH_STATUS  PAY_PATCH_STATUS_N1) */
                 distinct substr(ppf.full_name,1,40) ,
                 pef.assignment_id ,
                 substr(pef.assignment_number,1,17),
                 substr(pusc.city_name,1,20),
                 pgu.new_juri_code
          from   pay_patch_status pps,
                 pay_us_geo_update pgu,
                 pay_us_city_names pusc,
                 per_assignments_f pef,
                 per_people_f ppf
          where  pgu.process_type = 'NEW_CITY_RECORDS'
          and    pef.assignment_id = pgu.assignment_id
          and    ppf.person_id = pef.person_id
          and    pusc.city_code = substr(new_juri_code,8,4)
          and    pusc.county_code = substr(new_juri_code,4,3)
          and    pusc.state_code = substr(new_juri_code,1,2)
          and    pgu.process_mode = cp_process_mode
          and    pusc.primary_flag = 'Y'
          and    pgu.id = pps.id
          and    pps.patch_name = cp_geocode_patch_name;
Line: 2222

         select    /*+ ORDERED
                   INDEX (PAY_US_GEO_UPDATE PAY_US_GEO_UPDATE_N2 )
                   INDEX (PAY_PATCH_STATUS  PAY_PATCH_STATUS_N1) */
                 distinct substr(ppf.full_name,1,40) ,
                 pef.assignment_id ,
                 substr(pef.assignment_number,1,17),
                 substr(pusc.city_name,1,20),
                 pgu.new_juri_code
          from   pay_patch_status pps,
                 pay_us_geo_update pgu,
                 pay_us_city_names pusc,
                 per_assignments_f pef,
                 per_people_f ppf
          where  pgu.process_type = 'NEW_VERTEX_RECORDS'
          and    pef.assignment_id = pgu.assignment_id
          and    ppf.person_id = pef.person_id
          and    pusc.city_code = substr(new_juri_code,8,4)
          and    pusc.county_code = substr(new_juri_code,4,3)
          and    pusc.state_code = substr(new_juri_code,1,2)
          and    pusc.primary_flag = 'Y'
          and    pgu.process_mode = cp_process_mode
          and    pgu.id = pps.id
          and    pps.patch_name = cp_geocode_patch_name;
Line: 2431

          select    /*+ ORDERED
                   INDEX (PAY_US_GEO_UPDATE PAY_US_GEO_UPDATE_N2 )
                   INDEX (PAY_PATCH_STATUS  PAY_PATCH_STATUS_N1) */
                  distinct old_juri_code ,
                  new_juri_code
           from  pay_patch_status pps,
                 pay_us_geo_update pgu
          where  pgu.process_type = 'TAX_RULES_CHANGE'
          and    pgu.process_mode = cp_process_mode
          and    pgu.id = pps.id
          and    pps.patch_name = cp_geocode_patch_name;
Line: 2591

          SELECT   /*+ ORDERED
                     INDEX (PAY_US_MODIFIED_GEOCODES PAY_US_MODIFIED_GEOCODES_N1) */
                 distinct
                     substr(ppf.full_name,1,40),
                     paf.assignment_id ,
                     substr(paf.assignment_number,1,17),
                     substr(pmod.city_name,1,20),
                     ectr.jurisdiction_code,
                     substr(puc1.county_name,1,20),
                     pmod.state_code||'-'||pmod.new_county_code||'-'||pmod.new_city_code "New JD",
                     substr(puc2.county_name,1,20)
           FROM  pay_us_modified_geocodes pmod,
                 pay_us_emp_city_tax_rules_f ectr,
                 per_assignments_f paf,
                 per_people_f ppf,
                 pay_us_counties puc1,
                 pay_us_counties puc2
          WHERE  ppf.person_id = paf.person_id
            AND  pmod.state_code = ectr.state_code
            AND  pmod.state_code = puc1.state_code
            AND  pmod.state_code = puc2.state_code
            AND  pmod.county_code = puc1.county_code
            AND  pmod.new_county_code = puc2.county_code
            AND  pmod.county_code = ectr.county_code
            AND  pmod.new_county_code is not null
            AND  pmod.old_city_code = ectr.city_code
            AND  ectr.assignment_id = paf.assignment_id
            AND  pmod.patch_name = cp_geocode_patch_name
            and  pmod.process_type in ('P', 'PC', 'PU', 'S', 'SU', 'UP', 'US');
Line: 2666

                                         'changing their county codes. You must update the jurisdiction information'
                                         ,p_output_file_type
                                         ));
Line: 2852

                                         'The following tables were updated and now have the following row counts:'
                                         ,p_output_file_type
                                         ));
Line: 2908

       select count(*)
       into  ln_row_count
       from pay_us_states;
Line: 2936

       select count(*)
       into  ln_row_count
       from pay_us_counties;
Line: 2964

       select count(*)
       into  ln_row_count
       from pay_us_city_geocodes;
Line: 2991

       select count(*)
       into  ln_row_count
       from pay_us_city_names;
Line: 3018

       select count(*)
       into  ln_row_count
       from pay_us_zip_codes;
Line: 3045

       select count(*)
       into  ln_row_count
       from pay_us_modified_geocodes;
Line: 3098

         select hla.location_code "Work Location",
               hla.description "Location Description",
               hla.address_line_1 "Address",
               hla.town_or_city "City Name",
               hla.region_1 "County",
               hla.region_2 "State",
               hla.postal_code "Zipcode"
        from hr_locations_all hla
        where hla.location_id in
            (select distinct location_id
            from   per_assignments_f paf,
                   pay_us_emp_city_tax_rules_f pctr
            where  ( (        pctr.STATE_CODE  = '26'
                       and    pctr.county_code = '510'
                       and    pctr.city_code   = '1270')
                   or (       pctr.state_code  = '21'
                       and    pctr.county_code = '510'
                       and    pctr.city_code   = '0040')
                    )
            and  pctr.assignment_id = paf.assignment_id  )
        and  postal_code in
               ( '63142',
                 '63148',
                 '63149',
                 '63152',
                 '63153',
                 '63154',
                 '63159',
                 '63161',
                 '63162',
                 '63165',
                 '63168',
                 '63170',
                 '63172',
                 '63173',
                 '63174',
                 '63175',
                 '63176',
                 '63181',
                 '63183',
                 '63184',
                 '63185',
                 '63186',
                 '63187',
                 '63189',
                 '63191',
                 '63192',
                 '63193',
                 '63194',
                 '21232',
                 '21238',
                 '21242',
                 '21243',
                 '21245',
                 '21246',
                 '21247',
                 '21248',
                 '21249',
                 '21253',
                 '21254',
                 '21255',
                 '21256',
                 '21257',
                 '21258',
                 '21259',
                 '21260',
                 '21261',
                 '21262',
                 '21266',
                 '21267',
                 '21269',
                 '21271',
                 '21272',
                 '21276',
                 '21277',
                 '21291',
                 '21292',
                 '21293',
                 '21294',
                 '21295',
                 '21296',
                 '21299' );
Line: 3376

        SELECT distinct substr(ppf.full_name,1,40),
               substr(addr.address_line1 ,1,30),
               substr(addr.town_or_city,1,20),
               substr(addr.region_1 ,1,20),
               substr(addr.region_2 ,1,5),
               substr(addr.postal_code ,1,10)
        from per_addresses addr,
             per_all_people_f ppf
        where addr.person_id = ppf.person_id
        and ppf.person_id in
            (select distinct person_id
            from   per_assignments_f paf,
                   pay_us_emp_city_tax_rules_f pctr
            where  ( (        pctr.STATE_CODE  = '26'
                       and    pctr.county_code = '510'
                       and    pctr.city_code   = '1270')
                   or (       pctr.state_code  = '21'
                       and    pctr.county_code = '510'
                       and    pctr.city_code   = '0040')
                    )
            and  pctr.assignment_id = paf.assignment_id  )
        and  addr.postal_code in
               ( '63142',
                 '63148',
                 '63149',
                 '63152',
                 '63153',
                 '63154',
                 '63159',
                 '63161',
                 '63162',
                 '63165',
                 '63168',
                 '63170',
                 '63172',
                 '63173',
                 '63174',
                 '63175',
                 '63176',
                 '63181',
                 '63183',
                 '63184',
                 '63185',
                 '63186',
                 '63187',
                 '63189',
                 '63191',
                 '63192',
                 '63193',
                 '63194',
                 '21232',
                 '21238',
                 '21242',
                 '21243',
                 '21245',
                 '21246',
                 '21247',
                 '21248',
                 '21249',
                 '21253',
                 '21254',
                 '21255',
                 '21256',
                 '21257',
                 '21258',
                 '21259',
                 '21260',
                 '21261',
                 '21262',
                 '21266',
                 '21267',
                 '21269',
                 '21271',
                 '21272',
                 '21276',
                 '21277',
                 '21291',
                 '21292',
                 '21293',
                 '21294',
                 '21295',
                 '21296',
                 '21299' );