DBA Data[Home] [Help]

APPS.PQP_BUDGET_MAINTENANCE SQL Statements

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

Line: 52

      SELECT business_group_id
        FROM per_all_assignments_f
       WHERE assignment_id = p_assignment_id;
Line: 60

      SELECT legislation_code
        FROM per_business_groups
       WHERE business_group_id = p_business_group_id;
Line: 142

      g_tab_asg_set_amnds.DELETE;
Line: 443

         SELECT legislative_parameters
           FROM pay_payroll_actions
          WHERE payroll_action_id = p_pay_action_id;
Line: 615

         SELECT formula_id
           FROM hr_assignment_sets ags
          WHERE assignment_set_id = c_asg_set_id
            AND EXISTS(SELECT 1
                         FROM hr_assignment_set_criteria agsc
                        WHERE agsc.assignment_set_id = ags.assignment_set_id);
Line: 625

         SELECT assignment_id, NVL(include_or_exclude
                                  ,'I') include_or_exclude
           FROM hr_assignment_set_amendments
          WHERE assignment_set_id = c_asg_set_id;
Line: 749

         SELECT 'X'
           FROM hr_assignment_set_amendments
          WHERE assignment_set_id = c_asg_set_id
            AND NVL(include_or_exclude, 'I') =
                                     'I' -- hard coded as it's from lookup code
            AND ROWNUM < 2;
Line: 779

      g_tab_asg_set_amnds.DELETE;
Line: 839

            'SELECT DISTINCT person_id FROM per_people_f ppf
                                    ,pay_payroll_actions ppa
       WHERE ppf.business_group_id = ppa.business_group_id
         AND ppa.payroll_action_id = :payroll_action_id
       ORDER BY ppf.person_id';
Line: 846

                'SELECT DISTINCT person_id FROM per_people_f ppf
                                     ,pay_payroll_actions ppa
        WHERE ppf.business_group_id = ppa.business_group_id
          AND ppa.payroll_action_id = :payroll_action_id
          AND ppf.person_id = '
             || l_person_id
             || ' ORDER BY ppf.person_id';
Line: 961

                      'SELECT DISTINCT person_id
                         FROM per_all_assignments_f        paa
                             ,hr_assignment_set_amendments hasa
                             ,pay_payroll_actions          ppa
         WHERE paa.business_group_id = ppa.business_group_id
                          AND ppa.payroll_action_id = :payroll_action_id
                          AND paa.assignment_id = hasa.assignment_id
                          AND NVL(hasa.include_or_exclude,'
                   || '''I'''
                   || ') = '
                   || '''I'''
                   || ' AND hasa.assignment_set_id = '
                   || l_assignment_set_id;
Line: 1032

         SELECT NVL(effective_date, SYSDATE)
           FROM fnd_sessions
          WHERE session_id = USERENV('SESSIONID');
Line: 1213

         SELECT   asg.assignment_id assignment_id, asg.payroll_id
             FROM per_all_assignments_f asg
            WHERE asg.person_id BETWEEN p_start_person AND p_end_person
              AND asg.assignment_id = NVL(c_assignment_id, asg.assignment_id)
	      AND asg.business_group_id = c_business_group_id
              AND (   c_effective_date BETWEEN asg.effective_start_date
                                           AND asg.effective_end_date
                   OR (    asg.effective_start_date > c_effective_date
                       AND asg.effective_end_date =
                                (SELECT MIN(asg2.effective_end_date)
                                   FROM per_all_assignments_f asg2
                                  WHERE asg2.assignment_id = asg.assignment_id)
                      )
                )
               AND asg.assignment_type NOT IN ('C', 'A', 'B')     -- Bug 6847750, 7718235
         ORDER BY asg.assignment_id;
Line: 1233

         SELECT pay_assignment_actions_s.NEXTVAL
           FROM DUAL;
Line: 1243

         SELECT   asg.assignment_id
             FROM per_all_assignments_f asg
                 ,hr_assignment_set_amendments hasa
            WHERE asg.assignment_id = hasa.assignment_id
              AND hasa.assignment_set_id = c_assignment_set_id
              AND NVL(hasa.include_or_exclude, 'I') = 'I'
              AND asg.person_id BETWEEN p_start_person AND p_end_person
              AND asg.effective_end_date < c_effective_date
              AND NOT EXISTS(
                     SELECT 1
                       FROM per_all_assignments_f asg2
                      WHERE asg2.assignment_id = asg.assignment_id
                        AND (   c_effective_date
                                   BETWEEN asg2.effective_start_date
                                       AND asg2.effective_end_date
                             OR asg2.effective_start_date > c_effective_date
                            ))
         ORDER BY asg.assignment_id;
Line: 1269

         SELECT 'X'
           FROM pqp_assignment_attributes_f
          WHERE assignment_id = c_assignment_id
            AND contract_type = c_contract
            AND (   c_effective_date BETWEEN effective_start_date
                                         AND effective_end_date
                 OR effective_start_date > c_effective_date
                );
Line: 1589

         SELECT assignment_id, payroll_action_id
           FROM pay_assignment_actions
          WHERE assignment_action_id = p_assignment_action_id;
Line: 1599

      g_output_file_records.DELETE;
Line: 1750

         SELECT MIN(aat.effective_start_date)
           FROM pqp_assignment_attributes_f aat
          WHERE aat.assignment_id = p_assignment_id
            AND aat.contract_type IS NOT NULL;
Line: 1757

         SELECT MIN(asg.effective_start_date)
           FROM per_all_assignments_f asg
          WHERE asg.assignment_id = p_assignment_id
            AND asg.normal_hours IS NOT NULL;
Line: 1886

         SELECT MAX(asg.effective_end_date)
           FROM per_all_assignments_f asg
          WHERE asg.assignment_id = p_assignment_id
            AND asg.normal_hours IS NOT NULL;
Line: 2002

            SELECT NAME
              INTO l_log_string
              FROM per_business_groups_perf
             WHERE business_group_id = g_business_group_id;
Line: 2057

              SELECT event_group_name
                INTO l_log_string
                FROM pay_event_groups
               WHERE event_group_id = g_configuration_data.pcv_information3;
Line: 2081

            SELECT formula_name
              INTO l_log_string
              FROM ff_formulas_f
             WHERE formula_id = g_configuration_data.pcv_information5;
Line: 2137

    SELECT employee_number
      INTO g_output_file_records(g_output_file_records.FIRST).employee_number
      FROM per_all_people_f a
     WHERE a.person_id =
               (SELECT asg.person_id
                  FROM per_all_assignments_f asg
                 WHERE asg.assignment_id = p_assignment_id AND ROWNUM < 2)
                   AND effective_start_date = (SELECT MAX(b.effective_start_date)
                                                 FROM per_all_people_f b
                                                WHERE b.person_id = a.person_id);
Line: 2155

   SELECT assignment_number
     INTO g_output_file_records(g_output_file_records.FIRST).assignment_number
     FROM per_all_assignments_f a
    WHERE a.assignment_id = p_assignment_id
      AND a.effective_start_date =
                          (SELECT MAX(b.effective_start_date)
                             FROM per_all_assignments_f b
                            WHERE b.assignment_id = a.assignment_id);
Line: 2205

t_impact_dates.DELETE;
Line: 2220

update_value_for_event_dates(p_uom                    => p_uom
                            ,p_assignment_id          => p_assignment_id
                            ,p_business_group_id      => g_business_group_id
                            ,p_formula_id             => l_budget_fast_formula_id
                            ,p_action                 => p_action
                            ,p_effective_date         => l_effective_date
                            );
Line: 2290

            update_value_for_event_dates(p_uom                    => p_uom
                                        ,p_assignment_id          => p_assignment_id
                                        ,p_business_group_id      => g_business_group_id
                                        ,p_formula_id             => l_budget_fast_formula_id
					,p_action                 => p_action
                                        ,p_effective_date         => t_impact_dates(l_current
                                                                                   )
                                        );
Line: 2356

		   g_output_file_records.DELETE;
Line: 2383

		   g_output_file_records.DELETE; -- do not include in clear cache
Line: 2574

         SELECT event_group_name
           FROM pay_event_groups
          WHERE event_group_id = p_event_group_id;
Line: 2634

      p_impact_dates.DELETE;
Line: 2804

         SELECT user_table_id
           FROM pay_user_tables
          WHERE user_table_name = 'PQP_CONTRACT_TYPES'
	    AND legislation_code = p_legislation_code;
Line: 2815

         SELECT pur.user_row_id
           FROM pqp_assignment_attributes_f aat, pay_user_rows_f pur
          WHERE aat.assignment_id = p_assignment_id
            AND p_effective_date BETWEEN aat.effective_start_date
                                     AND aat.effective_end_date
            AND pur.user_table_id = p_pqp_contract_table_id
            AND pur.business_group_id = aat.business_group_id
            AND pur.row_low_range_or_name = aat.contract_type
            AND aat.effective_start_date BETWEEN pur.effective_start_date
                                             AND pur.effective_end_date;
Line: 2832

         SELECT   inst2.effective_start_date
             FROM pay_user_column_instances_f inst1
                 ,pay_user_column_instances_f inst2
            WHERE (   inst1.effective_start_date >= p_effective_start_date
                   OR p_effective_start_date BETWEEN inst1.effective_start_date
                                                 AND inst1.effective_end_date
                  )
              AND inst1.user_row_id = p_user_row_id
              AND inst2.user_column_instance_id =
                                                 inst1.user_column_instance_id
              AND inst2.effective_start_date = inst1.effective_end_date + 1
              AND NVL(inst2.VALUE, '{null}') <> NVL(inst1.VALUE, '~NULL~')
         ORDER BY 1;
Line: 2854

         SELECT   asg2.effective_start_date
             FROM per_all_assignments_f asg1, per_all_assignments_f asg2
            WHERE asg1.assignment_id = p_assignment_id
              AND (   asg1.effective_start_date >= p_effective_start_date
                   OR p_effective_start_date BETWEEN asg1.effective_start_date
                                                 AND asg1.effective_end_date
                  )
              AND asg2.assignment_id = asg1.assignment_id
              AND asg2.effective_start_date = asg1.effective_end_date + 1
              AND NVL(asg2.normal_hours, -1) <> NVL(asg1.normal_hours, -2)
         UNION ALL
         SELECT   aat2.effective_start_date
             FROM pqp_assignment_attributes_f aat1
                 ,pqp_assignment_attributes_f aat2
            WHERE aat1.assignment_id = p_assignment_id
              AND (   aat1.effective_start_date >= p_effective_start_date
                   OR p_effective_start_date BETWEEN aat1.effective_start_date
                                                 AND aat1.effective_end_date
                  )
              AND aat1.assignment_id = aat2.assignment_id
              AND aat2.effective_start_date = aat1.effective_end_date + 1
              AND NVL(aat2.contract_type, '{null}') <>
                                             NVL(aat1.contract_type, '[NULL]')
         UNION ALL
         SELECT   inst2.effective_start_date
             FROM pay_user_column_instances_f inst1
                 ,pay_user_column_instances_f inst2
            WHERE (   inst1.effective_start_date >= p_effective_start_date
                   OR p_effective_start_date BETWEEN inst1.effective_start_date
                                                 AND inst1.effective_end_date
                  )
              AND inst1.user_row_id = p_user_row_id
              AND inst2.user_column_instance_id =
                                                 inst1.user_column_instance_id
              AND inst2.effective_start_date = inst1.effective_end_date + 1
              AND NVL(inst2.VALUE, '{null}') <> NVL(inst1.VALUE, '~NULL~')
         ORDER BY 1;
Line: 3158

   PROCEDURE update_value_for_event_dates(
      p_uom                 IN   VARCHAR2
     ,p_assignment_id       IN   NUMBER
     ,p_business_group_id   IN   NUMBER
     ,p_formula_id          IN   NUMBER
     ,p_action              IN   VARCHAR2
     ,p_effective_date      IN   DATE
   )
   IS
      CURSOR csr_formula_name(p_formula_id NUMBER)
      IS
         SELECT formula_name
           FROM ff_formulas_f
          WHERE formula_id = p_formula_id;
Line: 3181

                          := g_package_name || 'update_value_for_event_dates';
Line: 3303

               update_and_store_abv(p_uom                    => p_uom
                                   ,p_assignment_id          => p_assignment_id
                                   ,p_business_group_id      => p_business_group_id
                                   ,p_abv_value              => fnd_number.canonical_to_number(l_outputs(l_out_cnt
                                                                         ).VALUE)  -- bug 4372165
				   ,p_action                 => p_action
                                   ,p_effective_date         => p_effective_date
                                   );
Line: 3367

   END update_value_for_event_dates;
Line: 3373

   PROCEDURE update_and_store_abv(
      p_uom                 IN   VARCHAR2
     ,p_assignment_id       IN   NUMBER
     ,p_business_group_id   IN   NUMBER
     ,p_abv_value           IN   NUMBER
     ,p_action              IN   VARCHAR2
     ,p_effective_date      IN   DATE
   )
   IS
      CURSOR csr_abv_exists(p_assignment_id NUMBER, p_uom VARCHAR2)
      IS
         SELECT 1
           FROM per_assignment_budget_values_f
          WHERE assignment_id = p_assignment_id AND unit = p_uom
                AND ROWNUM < 2;
Line: 3395

         SELECT assignment_budget_value_id, VALUE, effective_start_date
               ,effective_end_date, object_version_number
           FROM per_assignment_budget_values_f
          WHERE assignment_id = p_assignment_id
            AND unit = p_uom
            AND p_effective_date BETWEEN effective_start_date
                                     AND effective_end_date;
Line: 3408

         SELECT effective_end_date
           FROM per_assignment_budget_values_f
          WHERE assignment_budget_value_id = p_assignment_budget_value_id
            AND effective_start_date > p_effective_date
            AND ROWNUM < 2;
Line: 3416

                                   := g_package_name || 'update_and_store_abv';
Line: 3460

                        ,p_program_update_date             => NULL
                        ,p_assignment_budget_value_id      => l_effective_abv_row.assignment_budget_value_id
                        ,p_object_version_number           => l_effective_abv_row.object_version_number
                        ,p_effective_start_date            => l_effective_abv_row.effective_start_date
                        ,p_effective_end_date              => l_effective_abv_row.effective_end_date
                        );
Line: 3472

                                                                     'INSERT';
Line: 3552

            l_datetrack_mode    := 'UPDATE_OVERRIDE';
Line: 3556

               l_datetrack_mode    := 'UPDATE';
Line: 3571

         IF l_datetrack_mode <> 'UPDATE_OVERRIDE'
         THEN
            --
            -- only do a datetrack UPDATE or correction if the value is different
            --
            l_proc_step    := 45;
Line: 3605

                              ,p_program_update_date             => NULL
                              ,p_effective_start_date            => l_effective_abv_row.effective_start_date
                              ,p_effective_end_date              => l_effective_abv_row.effective_end_date
                              );
Line: 3633

         ELSE -- l_datetrack_mode = 'UPDATE_OVERRIDE' THEN
            IF g_debug
            THEN
               IF g_is_concurrent_program_run
               THEN
                  debug('g_is_concurrent_program_run:TRUE');
Line: 3669

                                 ,p_program_update_date             => NULL
                                 ,p_effective_start_date            => l_effective_abv_row.effective_start_date
                                 ,p_effective_end_date              => l_effective_abv_row.effective_end_date
                                 );
Line: 3699

                                 ,p_program_update_date             => NULL
                                 ,p_effective_start_date            => l_effective_abv_row.effective_start_date
                                 ,p_effective_end_date              => l_effective_abv_row.effective_end_date
                                 );
Line: 3708

                                                            'UPDATE_OVERRIDE';
Line: 3723

                                                            'UPDATE_OVERRIDE';
Line: 3728

         END IF; -- IF l_datetrack_mode <> 'UPDATE_OVERRIDE' THEN
Line: 3781

   END update_and_store_abv;
Line: 3792

         SELECT assignment_action_id
           FROM pay_assignment_actions
          WHERE payroll_action_id = p_pay_action_id AND action_status = 'C';
Line: 3800

         SELECT COUNT(*)
           FROM pay_assignment_actions
          WHERE payroll_action_id = p_pay_action_id;
Line: 3817

   delete assignment actions

l_proc_step    := 10;
Line: 3834

      DELETE FROM pay_action_interlocks
               WHERE locking_action_id = l_asg_action_id;
Line: 3840

          debug(SQL%ROWCOUNT || ' pay_action_interlocks rows deleted');
Line: 3845

      DELETE FROM pay_message_lines
            WHERE source_id = l_asg_action_id AND source_type = 'A';
Line: 3851

          debug(SQL%ROWCOUNT || ' pay_message_lines rows deleted');
Line: 3856

      DELETE FROM pay_assignment_actions
             WHERE assignment_action_id = l_asg_action_id;
Line: 3862

          debug(SQL%ROWCOUNT || ' pay_assignment_action rows deleted');
Line: 3884

     DELETE FROM pay_message_lines
           WHERE source_id = p_pay_action_id AND source_type = 'P';
Line: 3890

         debug(SQL%ROWCOUNT || ' pay_message_lines rows deleted');
Line: 3896

     DELETE FROM pay_population_ranges
               WHERE payroll_action_id = p_pay_action_id;
Line: 3902

         debug(SQL%ROWCOUNT || ' pay_population_ranges rows deleted');
Line: 3907

     DELETE FROM pay_payroll_actions
               WHERE payroll_action_id = p_pay_action_id;
Line: 3913

         debug(SQL%ROWCOUNT || ' pay_payroll_actions rows deleted');