DBA Data[Home] [Help]

APPS.PNRX_SP_ASSIGN_BY_LOC SQL Statements

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

Line: 17

   SELECT 'X'
   INTO   v_var1
   FROM   pn_space_assign_loc_itf
   WHERE  location_id = p_location_id
   AND    person_id(+) = p_person_id
   AND    cost_center = p_cost_center
   AND    request_id = P_request_id;
Line: 50

   SELECT 'Y'
   INTO   v_var2
   FROM   pn_space_assign_loc_itf
   WHERE  location_id = p_location_id
   AND    customer_account = p_account_id
   AND    request_id = p_request_id;
Line: 148

   v_last_update_date              pn_space_assign_loc_itf.last_update_date%TYPE;
Line: 149

   v_last_updated_by               pn_space_assign_loc_itf.last_updated_by%TYPE;
Line: 150

   v_last_update_login             pn_space_assign_loc_itf.last_update_login%TYPE;
Line: 184

   SELECT  chart_of_accounts_id into v_coa_id
   FROM gl_sets_of_books
   WHERE set_of_books_id= TO_NUMBER(pn_mo_cache_utils.get_profile_value('PN_SET_OF_BOOKS_ID',
                                    pn_mo_cache_utils.get_current_org_id));
Line: 249

         'SELECT DISTINCT
                 loc.location_id location_i
          FROM   pn_locations        loc,
                 pn_properties       p
          WHERE  p.property_id(+) = loc.property_id '
         ||property_code_where_clause||location_code_where_clause||location_type_where_clause;
Line: 300

            SELECT DISTINCT
                   loc.location_id                     location_id,
                   fl1.meaning                         location_type,
                   NVL(NVL(loc.building, loc.FLOOR), loc.office) location_name,
                   loc.location_code                   location_code,
                   loc.location_type_lookup_code       lOC_TYPE, --BUG#2226865
                   fl.meaning                          usage_type,
                   loc.rentable_area                   rentable_area,
                   loc.usable_area                     usable_area,
                   loc.assignable_area                 assignable_area,
                   loc.common_area                     common_area,
                   loc.attribute_category              attribute_category,
                   loc.attribute1                      attribute1,
                   loc.attribute2                      attribute2,
                   loc.attribute3                      attribute3,
                   loc.attribute4                      attribute4,
                   loc.attribute5                      attribute5,
                   loc.attribute6                      attribute6,
                   loc.attribute7                      attribute7,
                   loc.attribute8                      attribute8,
                   loc.attribute9                      attribute9,
                   loc.attribute10                     attribute10,
                   loc.attribute11                     attribute11,
                   loc.attribute12                     attribute12,
                   loc.attribute13                     attribute13,
                   loc.attribute14                     attribute14,
                   loc.attribute15                     attribute15,
                   loc.last_update_date                last_update_date,
                   loc.last_updated_by                 last_updated_by,
                   loc.last_update_login               last_update_login,
                   loc.creation_date                   creation_date,
                   loc.created_by                      created_by
            FROM   pn_locations_all loc,
                   fnd_lookups  fl,
                   fnd_lookups  fl1
            WHERE  fl.lookup_code(+) = loc.space_type_lookup_code
            AND    fl.lookup_type(+) = 'PN_SPACE_TYPE'
            AND    fl1.lookup_code(+)= loc.location_type_lookup_code
            AND    fl1.lookup_type(+)= 'PN_LOCATION_TYPE'
            and    nvl(trunc(as_of_date),trunc(loc.active_start_date)) between
                   trunc(loc.active_start_date) and trunc(loc.active_end_date);
Line: 343

            AND    loc.location_id IN (SELECT loc.location_id from pn_locations_all loc
                                       WHERE loc.active_start_date <= as_of_date
                                       AND   loc.active_end_date >= as_of_date
                                       AND   loc.location_id = v_location_id_1);
Line: 377

                  v_last_update_date                         ,
                  v_last_updated_by                          ,
                  v_last_update_login                        ,
                  v_creation_date                            ,
                  v_created_by                               ;
Line: 385

               SELECT DISTINCT
                      emp.location_id                     location_id,
                      emp.person_id                       person_id,
                      emp.cost_center_code                cost_center,
                      pa.segment1                         employee_project_number,
                      pat.task_name                       employee_task_number,
                      emp.allocated_area                  employee_assigned_area,
                      emp.emp_assign_start_date           employee_assigned_from,
                      emp.emp_assign_end_date             employee_assigned_to,
                      NULL                                customer_account,
                      NULL                                customer_project_number,
                      NULL                                customer_task_number,
                      0                                   customer_assigned_area,
                      NULL                                customer_assigned_from,
                      NULL                                customer_assigned_to,
                      NULL                                customer_name,
                      NULL                                customer_site,
                      NULL                                customer_category
               FROM   pa_projects_all pa,
                      pa_tasks pat,
                      pn_space_assign_emp_all emp
               WHERE  emp.location_id = V_LOCATION_ID_2
               AND    pa.project_id(+)= emp.project_id
               AND    pat.task_id(+)  = emp.task_id
               AND    as_of_date BETWEEN emp.emp_assign_start_date AND NVL(emp.emp_assign_end_date, l_date);
Line: 445

                  INSERT INTO pn_space_assign_loc_itf
                  (location_id                     ,
                   location_type                   ,
                   location_name                   ,
                   location_code                   ,
                   space_type                      ,
                   property_code                   ,
                   property_name                   ,
                   building_location_code          ,
                   building_or_land_name           ,
                   floor_location_code             ,
                   floor_or_parcel_name            ,
                   office_location_code            ,
                   office_or_section_name          ,
                   rentable_area                   ,
                   usable_area                     ,
                   assignable_area                 ,
                   common_area                     ,
                   person_id                       ,
                   employee_name                   ,
                   cost_center                     ,
                   employee_number                 ,
                   employee_type                   ,
                   employee_category               ,
                   employee_position               ,
                   employee_project_number         ,
                   employee_task_number            ,
                   employee_assigned_area          ,
                   employee_vacant_area            ,
                   employee_assigned_from          ,
                   employee_assigned_to            ,
                   customer_name                   ,
                   customer_site                   ,
                   customer_category               ,
                   customer_account                ,
                   customer_project_number         ,
                   customer_task_number            ,
                   customer_assigned_area          ,
                   customer_assigned_from          ,
                   customer_assigned_to            ,
                   loc_attribute_category          ,
                   loc_attribute1                  ,
                   loc_attribute2                  ,
                   loc_attribute3                  ,
                   loc_attribute4                  ,
                   loc_attribute5                  ,
                   loc_attribute6                  ,
                   loc_attribute7                  ,
                   loc_attribute8                  ,
                   loc_attribute9                  ,
                   loc_attribute10                 ,
                   loc_attribute11                 ,
                   loc_attribute12                 ,
                   loc_attribute13                 ,
                   loc_attribute14                 ,
                   loc_attribute15                 ,
                   last_update_date                ,
                   last_updated_by                 ,
                   last_update_login               ,
                   creation_date                   ,
                   created_by,
                   request_id           )
                  VALUES
                  (v_location_id                              ,
                   v_location_type                            ,
                   v_location_name                            ,
                   v_location_code                            ,
                   v_space_type                               ,
                   v_code_data.property_code                  ,
                   v_code_data.property_name                  ,
                   v_code_data.building_location_code         ,
                   v_code_data.building                       ,
                   v_code_data.floor_location_code            ,
                   v_code_data.FLOOR                          ,
                   v_code_data.office_location_code           ,
                   v_code_data.office                         ,
                   v_loc_area.rentable_area                   ,--BUG#2226865
                   v_loc_area.usable_area                     ,--BUG#2226865
                   v_loc_area.assignable_area                 ,--BUG#2226865
                   v_loc_area.common_area                     ,--BUG#2226865
                   v_person_id                                ,
                   v_emp_data.full_name                       ,
                   v_cost_center                              ,
                   v_emp_data.employee_number                 ,
                   v_emp_data.employee_type                   ,
                   v_emp_data.employment_category_meaning     ,
                   v_emp_data.position                        ,
                   v_employee_project_number                  ,
                   v_employee_task_number                     ,
                   v_space_area.allocated_area_emp            ,  --BUG#2226865
                   v_space_area.vacant_area                   ,   --BUG#2226865
                   v_employee_assigned_from                   ,
                   v_employee_assigned_to                     ,
                   v_customer_name                            ,
                   v_customer_site                            ,
                   v_customer_category                        ,
                   v_customer_account                         ,
                   v_customer_project_number                  ,
                   v_customer_task_number                     ,
                   v_space_area.allocated_area_cust           ,  --BUG#2226865
                   v_customer_assigned_from                   ,
                   v_customer_assigned_to                     ,
                   v_attribute_category                       ,
                   v_attribute1                               ,
                   v_attribute2                               ,
                   v_attribute3                               ,
                   v_attribute4                               ,
                   v_attribute5                               ,
                   v_attribute6                               ,
                   v_attribute7                               ,
                   v_attribute8                               ,
                   v_attribute9                               ,
                   v_attribute10                              ,
                   v_attribute11                              ,
                   v_attribute12                              ,
                   v_attribute13                              ,
                   v_attribute14                              ,
                   v_attribute15                              ,
                   v_last_update_date                         ,
                   v_last_updated_by                          ,
                   v_last_update_login                        ,
                   v_creation_date                            ,
                   v_created_by                               ,
                   l_request_id
                  );
Line: 583

         'SELECT DISTINCT
                 loc.location_id location_id
          FROM   pn_locations        loc,
                 pn_properties       p
          WHERE  p.property_id(+) = loc.property_id '
         ||property_code_where_clause||location_code_where_clause||location_type_where_clause;
Line: 633

            SELECT DISTINCT
                   loc.location_id                     location_id,
                   fl1.meaning                         location_type,
                   NVL(NVL(loc.building, loc.floor), loc.office) location_name,
                   loc.location_code                   location_code,
                   loc.location_type_lookup_code       Loc_type, --BUG#2226865
                   fl.meaning                          usage_type,
                   loc.rentable_area                   rentable_area,
                   loc.usable_area                     usable_area,
                   loc.assignable_area                 assignable_area,
                   loc.common_area                     common_area,
                   loc.attribute_category              attribute_category,
                   loc.attribute1                      attribute1,
                   loc.attribute2                      attribute2,
                   loc.attribute3                      attribute3,
                   loc.attribute4                      attribute4,
                   loc.attribute5                      attribute5,
                   loc.attribute6                      attribute6,
                   loc.attribute7                      attribute7,
                   loc.attribute8                      attribute8,
                   loc.attribute9                      attribute9,
                   loc.attribute10                     attribute10,
                   loc.attribute11                     attribute11,
                   loc.attribute12                     attribute12,
                   loc.attribute13                     attribute13,
                   loc.attribute14                     attribute14,
                   loc.attribute15                     attribute15,
                   loc.last_update_date                last_update_date,
                   loc.last_updated_by                 last_updated_by,
                   loc.last_update_login               last_update_login,
                   loc.creation_date                   creation_date,
                   loc.created_by                      created_by
            FROM   pn_locations_all loc,
                   fnd_lookups  fl,
                   fnd_lookups  fl1
            WHERE  fl.lookup_code(+) = loc.space_type_lookup_code
            AND    fl.lookup_type(+) = 'PN_SPACE_TYPE'
            AND    fl1.lookup_code(+)= loc.location_type_lookup_code
            AND    fl1.lookup_type(+)= 'PN_LOCATION_TYPE'
            and    nvl(trunc(as_of_date),trunc(loc.active_start_date)) between
                   trunc(loc.active_start_date) and trunc(loc.active_end_date);
Line: 675

            AND    loc.location_id IN (SELECT loc.location_id from pn_locations_all loc
                                       WHERE loc.active_start_date <= as_of_date
                                       AND   loc.active_end_date   >= as_of_date
                                       AND   loc.location_id = v_location_id_1 );
Line: 708

                  v_last_update_date                         ,
                  v_last_updated_by                          ,
                  v_last_update_login                        ,
                  v_creation_date                            ,
                  v_created_by                               ;
Line: 716

               SELECT DISTINCT
                      cust.location_id                     location_id,
                      0                                    person_id,
                      NULL                                 cost_center,
                      NULL                                 employee_project_number,
                      NULL                                 employee_task_number,
                      0                                    employee_assigned_area,
                      NULL                                 employee_assigned_FROM,
                      NULL                                 employee_assigned_to,
                      cust.expense_account_id              exp_account,
                      cust.cust_account_id                 customer_account_id,
                      pa.segment1                          customer_project_number,
                      pat.task_name                        customer_task_number,
                      cust.allocated_area                  customer_assigned_area,
                      cust.cust_assign_start_date          customer_assigned_from,
                      cust.cust_assign_end_date            customer_assigned_to,
                      hp.party_name                        customer_name,
                      hcsu.location                        customer_site,
                      arl.meaning                          customer_category
               FROM   hz_parties                      hp,
                      hz_cust_site_uses_all           hcsu,
                      ar_lookups                      arl,
                      hz_cust_accounts                hca,
                      pa_projects_all                 pa,
                      pa_tasks                        pat,
                      pn_space_assign_cust_all        cust
               WHERE  cust.location_id = v_location_id_2
               AND    hca.cust_account_id = cust.cust_account_id
               AND    hca.party_id = hp.party_id
               AND    arl.lookup_code(+) = hp.category_code
               AND    arl.lookup_type(+) = 'CUSTOMER_CATEGORY'
               AND    hcsu.site_use_id(+) = cust.site_use_id
               AND    pa.project_id(+) = cust.project_id
               AND    pat.task_id(+) = cust.task_id
               AND    as_of_date BETWEEN cust.cust_assign_start_date AND NVL(cust.cust_assign_end_date, l_date);
Line: 787

                  INSERT INTO pn_space_assign_loc_itf
                  (
                   location_id                     ,
                   location_type                   ,
                   location_name                   ,
                   location_code                   ,
                   space_type                      ,
                   property_code                   ,
                   property_name                   ,
                   building_location_code          ,
                   building_or_land_name           ,
                   floor_location_code             ,
                   floor_or_parcel_name            ,
                   office_location_code            ,
                   office_or_section_name          ,
                   rentable_area                   ,
                   usable_area                     ,
                   assignable_area                 ,
                   common_area                     ,
                   person_id                       ,
                   employee_name                   ,
                   cost_center                     ,
                   employee_number                 ,
                   employee_type                   ,
                   employee_category               ,
                   employee_position               ,
                   employee_project_number         ,
                   employee_task_number            ,
                   employee_assigned_area          ,
                   employee_assigned_from          ,
                   employee_assigned_to            ,
                   customer_name                   ,
                   customer_site                   ,
                   customer_category               ,
                   customer_account                ,
                   customer_project_number         ,
                   customer_task_number            ,
                   customer_assigned_area          ,
                   customer_vacant_area            ,
                   customer_assigned_from          ,
                   customer_assigned_to            ,
                   loc_attribute_category          ,
                   loc_attribute1                  ,
                   loc_attribute2                  ,
                   loc_attribute3                  ,
                   loc_attribute4                  ,
                   loc_attribute5                  ,
                   loc_attribute6                  ,
                   loc_attribute7                  ,
                   loc_attribute8                  ,
                   loc_attribute9                  ,
                   loc_attribute10                 ,
                   loc_attribute11                 ,
                   loc_attribute12                 ,
                   loc_attribute13                 ,
                   loc_attribute14                 ,
                   loc_attribute15                 ,
                   last_update_date                ,
                   last_updated_by                 ,
                   last_update_login               ,
                   creation_date                   ,
                   created_by                      ,
                   request_id
                  )
                  VALUES
                  (
                   v_location_id                                ,
                   v_location_type                              ,
                   v_location_name                              ,
                   v_location_code                              ,
                   v_space_type                                 ,
                   v_code_data.property_code                    ,
                   v_code_data.property_name                    ,
                   v_code_data.building_location_code           ,
                   v_code_data.building                         ,
                   v_code_data.floor_location_code              ,
                   v_code_data.floor                            ,
                   v_code_data.office_location_code             ,
                   v_code_data.office                           ,
                   v_loc_area.rentable_area                     , --BUG#2226865
                   v_loc_area.usable_area                       ,--BUG#2226865
                   v_loc_area.assignable_area                   ,--BUG#2226865
                   v_loc_area.common_area                       ,--BUG#2226865
                   v_person_id                                  ,
                   v_emp_data.full_name                         ,
                   v_cost_center                                ,
                   v_emp_data.employee_number                   ,
                   v_emp_data.employee_type                     ,
                   v_emp_data.employment_category_meaning       ,
                   v_emp_data.position                          ,
                   v_employee_project_number                    ,
                   v_employee_task_number                       ,
                   v_space_area.allocated_area_emp              ,  --BUG#2226865
                   v_employee_assigned_from                     ,
                   v_employee_assigned_to                       ,
                   v_customer_name                              ,
                   v_customer_site                              ,
                   v_customer_category                          ,
                   v_customer_account                           ,
                   v_customer_project_number                    ,
                   v_customer_task_number                       ,
                   v_space_area.allocated_area_cust             ,  --BUG#2226865
                   v_space_area.vacant_area                     ,  --Bug#2226865
                   v_customer_assigned_from                     ,
                   v_customer_assigned_to                       ,
                   v_attribute_category                         ,
                   v_attribute1                                 ,
                   v_attribute2                                 ,
                   v_attribute3                                 ,
                   v_attribute4                                 ,
                   v_attribute5                                 ,
                   v_attribute6                                 ,
                   v_attribute7                                 ,
                   v_attribute8                                 ,
                   v_attribute9                                 ,
                   v_attribute10                                ,
                   v_attribute11                                ,
                   v_attribute12                                ,
                   v_attribute13                                ,
                   v_attribute14                                ,
                   v_attribute15                                ,
                   v_last_update_date                           ,
                   v_last_updated_by                            ,
                   v_last_update_login                          ,
                   v_creation_date                              ,
                   v_created_by                                 ,
                   l_request_id
                  );