DBA Data[Home] [Help]

APPS.GHR_HISTORY_FETCH SQL Statements

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

Line: 120

		select	*
		from 		ghr_pa_history hist_1
		where 	( altered_pa_request_id is null OR
				  not exists (select 'exists'
							from ghr_pa_history hist_2
							where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
							and   hist_1.information1 		= hist_2.information1
							and   hist_1.nature_of_action_id	= hist_2.nature_of_action_id
							and   hist_1.table_name			= hist_2.table_name)
				)
			and 	information1   = cp_information1
			and	effective_date = cp_max_date_effective
			and   table_name     = cp_table_name
		order by	pa_history_id desc;
Line: 166

			hr_utility.set_location('Selected Root Request Id ' || l_root_pa_request_id || l_proc, 60);
Line: 233

		select	*
		from 		ghr_pa_history hist_1
		where
			-- root request or broken chain)
			( altered_pa_request_id is null OR
			  not exists (select 'exists'
						from ghr_pa_history hist_2
						where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
						and   hist_1.information1		= hist_2.information1
						and   hist_1.nature_of_action_id	= hist_2.nature_of_action_id
						and   hist_1.table_name			= hist_2.table_name)
				)
			-- and pa_history_id of the root of the record must be <= cp_root_pa_history_id
			and  (cp_root_pa_history_id >=
							(select min(pa_history_id)
							from ghr_pa_history
							where pa_request_id =
							(select 	min(pa_request_id)
							from 		ghr_pa_requests
							connect by 	pa_request_id = prior altered_pa_request_id
							start with 	pa_request_id = (select pa_request_id
												from 	ghr_pa_history
												where pa_history_id = hist_1.pa_history_id))
							and nature_of_action_id = hist_1.nature_of_action_id)
				-- or fetch record created by core form change with lower history_id
				OR
				(cp_root_pa_history_id >= hist_1.pa_history_id and
				 hist_1.pa_request_id is null))
				-- Bug #6356058 modified above to pick the latest core form change
				-- with history id greater than the root.
				/*(hist_1.pa_history_id >= cp_root_pa_history_id and
				 hist_1.pa_request_id is null))*/
			and	information1	=  cp_information1
			and 	effective_date	=  cp_date_effective
			and 	pa_history_id	<> cp_pa_history_id
			and	table_name		=  cp_table_name
		order by	pa_history_id desc;
Line: 274

	select min(pa_history_id),
		 min(pa_request_id),
		 min(nature_of_action_id)
	from ghr_pa_history
	where pa_request_id =
		(select 	min(pa_request_id)
		from 		ghr_pa_requests
		connect by 	pa_request_id = prior altered_pa_request_id
		start with 	pa_request_id = cp_pa_req_id)
	and nature_of_action_id = cp_noa_id;
Line: 286

	select
		pa_request_id,
		nature_of_action_id
	from ghr_pa_history
	where pa_history_id = cp_pa_history_id;
Line: 366

			hr_utility.set_location('Selected Root Hist Id ' || l_root_pa_history_id || l_proc, 60);
Line: 367

			hr_utility.set_location('Selected Root Request Id ' || l_root_pa_request_id || l_proc, 60);
Line: 388

				hr_utility.set_location('Selected Hist Id ' || p_hist_data.pa_history_id || l_proc, 61);
Line: 389

				hr_utility.set_location('Selected PaRequest Id ' || p_hist_data.pa_request_id || l_proc, 62);
Line: 416

		select
			min(pa_history_id)
		from ghr_pa_history
		where
			pa_request_id 		= cp_pa_request_id
		and	nature_of_action_id	= nvl(cp_nature_of_action_id, nature_of_action_id);
Line: 425

		select
			min(pa_request_id)
		from 		ghr_pa_requests
		connect by 	pa_request_id = prior altered_pa_request_id
		start with 	pa_request_id = cp_pa_request_id;
Line: 436

   select pa_history_id
   from ghr_pa_history
   where effective_date = p_hist_data.effective_date
   and   pa_history_id  > p_save_history_id
   and   information1   = p_hist_data.information1
   and   table_name     = p_hist_data.table_name
   and   pa_request_id  in (select pa_request_id
			    from ghr_pa_requests
			    where pa_notification_id is not null
			    start with pa_request_id 	 = p_hist_data.pa_request_id
			    connect by prior pa_request_id = altered_pa_request_id);
Line: 577

		select	*
		from 		ghr_pa_history		hist_1
		where
			-- root request or broken chain)
			( altered_pa_request_id is null OR
			  not exists (select 'exists'
						from ghr_pa_history hist_2
						where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
						and   hist_1.information1		= hist_2.information1
						and   hist_1.nature_of_action_id	= hist_2.nature_of_action_id)
				)
			-- and pa_history_id of the root of the record must be <= cp_root_pa_history_id
			and  (cp_root_pa_history_id >=
							(select min(pa_history_id)
							from ghr_pa_history
							where pa_request_id =
							(select 	min(pa_request_id)
							from 		ghr_pa_requests
							connect by 	pa_request_id = prior altered_pa_request_id
							start with 	pa_request_id = (select	pa_request_id
												from 	ghr_pa_history
												where	pa_history_id = hist_1.pa_history_id))
							and nature_of_action_id = hist_1.nature_of_action_id)
				-- or fetch record created by core form change with lower history_id
				OR
				(cp_root_pa_history_id >= hist_1.pa_history_id and
				 hist_1.pa_request_id is null))
			and	information1    = cp_information1
			and 	effective_date  = cp_date_effective
			and 	pa_history_id  <> cp_pa_history_id
			and   table_name      = cp_table_name
		order by	pa_history_id desc;
Line: 615

		select	max(effective_date)
		from 		ghr_pa_history hist_1
		where
			-- root request or broken chain)
			( altered_pa_request_id is null OR
			  not exists (select 'exists'
						from ghr_pa_history hist_2
						where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
						and   hist_1.information1		= hist_2.information1
						and   hist_1.nature_of_action_id	= hist_2.nature_of_action_id
						and   hist_1.table_name			= hist_2.table_name)
			)
			and 	information1    = cp_information1
			and 	effective_date   <  cp_date_effective
			and   table_name      = cp_table_name;
Line: 638

		select	max(effective_date)
		from 	ghr_pa_history hist_1
		where
		        -- root request or broken chain)
			( altered_pa_request_id is null OR
			  not exists (select 'exists'
						from ghr_pa_history hist_2
						where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
						and   hist_1.information1		= hist_2.information1
						and   hist_1.nature_of_action_id	= hist_2.nature_of_action_id
						and   hist_1.table_name			= hist_2.table_name)
			 )
			and 	information1    =  cp_information1
			and 	effective_date  =  cp_date_effective
			and     table_name      =  cp_table_name
			and     pa_history_id   <> cp_pa_history_id;
Line: 776

		select	max(effective_date)
		from 		ghr_pa_history hist_1
		where 	( altered_pa_request_id is null OR
				  not exists (select 'exists'
							from ghr_pa_history hist_2
							where hist_1.altered_pa_request_id 	= hist_2.pa_request_id
							and   hist_1.information1	= hist_2.information1
							and   hist_1.nature_of_action_id		= hist_2.nature_of_action_id
							and	hist_1.table_name			=	hist_2.table_name)
				)
			and 	information1	=  cp_information1
			and 	effective_date 	<= cp_date_effective
			and	table_name		=  cp_table_name;
Line: 793

	if called before update to database updates the record.
	if update to database has already applied the changes then it
	will return the post-update record. The session variable
	pre-update-record will hold the values which can be used for
	pre-record values
	*/
	hr_utility.set_location( l_proc, 20);
Line: 855

		select	*
		from	ghr_pa_history
		where	information1 	 = cp_information1
		and	pa_history_id	<> nvl(cp_pa_history_id, 0)
		and   table_name         = cp_table_name
		and   pa_request_id in
				(select pa_request_id
				 from ghr_pa_requests
				 start with pa_request_id 		= cp_pa_request_id
				 connect by prior pa_request_id	= altered_pa_request_id)
		and  nature_of_action_id + 0  = cp_noa_id
		order by pa_history_id desc;
Line: 906

		select 	*
		from		ghr_pa_history
		where		information1		= cp_information1
			and 	nature_of_action_id	= cp_noa_id_corrected
			and	pa_request_id		= cp_altered_pa_request_id
			and	table_name			= cp_table_name;
Line: 1012

		select pa_history_id
		from 		ghr_pa_history
		where		pa_request_id		= cp_pa_request_id
			and	nature_of_action_id	= cp_noa_id;
Line: 1042

		select pa_history_id
		from 		ghr_pa_history
		where		pa_request_id		= p_pa_request_id
			and	nature_of_action_id	= p_noa_id;
Line: 1080

		select 	*
		from 		per_all_people_f
		where 	person_id = p_person_id
			and 	p_date_effective between effective_start_date and effective_end_date;
Line: 1086

		select 	*
		from 		per_all_people_f
		where 	rowid = p_rowid;
Line: 1094

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 1110

            if called before update to database updates the record.
            if update to database has already applied the changes then it
            will return the post-update record. The session variable
            pre-update-record will hold the values which can be used for
            pre-record values
            */
		hr_utility.set_location( l_proc, 20);
Line: 1164

		select 	*
		from 		per_assignment_extra_info
		where 	rowid = p_rowid;
Line: 1169

      	select  object_version_number
            from    per_assignment_extra_info
            where   assignment_extra_info_id = p_assignment_extra_info_id;
Line: 1232

		select 	*
		from 		per_position_extra_info
		where 	rowid = p_rowid;
Line: 1237

      	select  object_version_number
            from    per_position_extra_info
            where   position_extra_info_id = p_position_extra_info_id;
Line: 1309

		select 	*
		from 		per_all_assignments_f
		where 	assignment_id = p_assignment_id
			and 	p_date_effective between effective_start_date and effective_end_date;
Line: 1314

		select 	*
		from 		per_all_assignments_f
		where 	rowid = p_rowid;
Line: 1322

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 1338

            if called before update to database updates the record.
            if update to database has already applied the changes then it
            will return the post-update record. The session variable
            pre-update-record will hold the values which can be used for
            pre-record values
            */
		hr_utility.set_location( l_proc, 20);
Line: 1397

		select 	*
		from 		pay_element_entries_f
		where 	element_entry_id = p_element_entry_id
			and 	p_date_effective between effective_start_date and effective_end_date;
Line: 1402

		select 	*
		from 		pay_element_entries_f
		where 	rowid = p_rowid;
Line: 1410

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 1426

            if called before update to database updates the record.
            if update to database has already applied the changes then it
            will return the post-update record. The session variable
            pre-update-record will hold the values which can be used for
            pre-record values
            */
		hr_utility.set_location( l_proc, 20);
Line: 1485

		select 	*
		from 		per_people_extra_info
		where 	rowid = p_rowid;
Line: 1489

       	select  object_version_number
            from    per_people_extra_info
            where   person_extra_info_id = p_person_extra_info_id;
Line: 1505

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 1568

      	select      aei.assignment_extra_info_id
            from        per_assignment_extra_info aei
            where       aei.assignment_id      =  p_assignment_id
            and         aei.information_type   =  p_information_type;
Line: 1607

      	select      pei.person_extra_info_id
            from        per_people_extra_info pei
            where       pei.person_id          =  p_person_id
            and         pei.information_type   =  p_information_type;
Line: 1648

      	select      ghr_pos.position_extra_info_id
            from        per_position_extra_info ghr_pos
            where       ghr_pos.position_id          =  p_position_id
            and         ghr_pos.information_type     =  p_information_type;
Line: 1719

		select 	*
		from 		pay_element_entry_values_f
		where 	element_entry_value_id = p_element_entry_value_id
		and 	p_date_effective between effective_start_date and effective_end_date;
Line: 1724

		select 	*
		from 		pay_element_entry_values_f
		where 	rowid = p_rowid;
Line: 1733

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 1749

            if called before update to database updates the record.
            if update to database has already applied the changes then it
            will return the post-update record. The session variable
            pre-update-record will hold the values which can be used for
            pre-record values
            */
		hr_utility.set_location( l_proc, 20);
Line: 1814

      select eev.element_entry_value_id
	  from pay_element_types_f elt,
	       pay_input_values_f ipv,
	       pay_element_entries_f ele,
	       pay_element_entry_values_f eev
	 where trunc(p_date_effective) between elt.effective_start_date
				   and elt.effective_end_date
	   and trunc(p_date_effective) between ipv.effective_start_date
				   and ipv.effective_end_date
	   and trunc(p_date_effective) between ele.effective_start_date
				   and ele.effective_end_date
	   and trunc(p_date_effective) between eev.effective_start_date
				   and eev.effective_end_date
	   and elt.element_type_id = ipv.element_type_id
	   and upper(elt.element_name) = upper(p_element_name)
	   and ipv.input_value_id = eev.input_value_id
	   and ele.assignment_id = p_assignment_id
	   and ele.element_entry_id + 0 = eev.element_entry_id
	   and upper(ipv.name) = upper(p_input_value_name)
--	   and NVL(elt.business_group_id,0)=NVL(ipv.business_group_id,0)
           and (elt.business_group_id is NULL or elt.business_group_id=p_bg_id);
Line: 1839

       Select distinct business_group_id bg
       from per_assignments_f
       where assignment_id = p_assignment_id
       and  p_eff_date between effective_start_date
             and effective_end_date;
Line: 1971

  select   elt.element_type_id,
           elt.processing_type
  from     pay_element_types_f elt
  where    upper(elt.element_name) =  upper(p_element_name)
  and      p_effective_date
  between  elt.effective_start_date and elt.effective_end_date
  and      (elt.business_group_id is null or elt.business_group_id=p_bg_id);
Line: 1986

select     ele.pa_request_id,
           ipv.input_value_id,
           eli.element_link_id,
           ele.element_entry_id
         from
               pay_input_values_f ipv,
               pay_element_links_f eli,
               ghr_element_entries_h_v ele
         where
           trunc(eff_date)    between ipv.effective_start_date
                                   and ipv.effective_end_date
           and   trunc(eff_date) between eli.effective_start_date
                                  and eli.effective_end_date
           and   trunc(eff_date) between ele.effective_start_date
                                   and ele.effective_end_date
           and  ipv.element_type_id   = l_ele_type_id
           and ipv.element_type_id     = eli.element_type_id
           and ele.assignment_id       = asg_id
           and ele.element_link_id     = eli.element_link_id
           and upper(ipv.name)         = upper(input_name)
           and ele.nature_of_action_id = l_session.noa_id_correct
           and ele.pa_request_id  in
          (select a.pa_request_id
           from   ghr_pa_requests a
           connect by a.pa_request_id = prior a.altered_pa_request_id
           start with a.pa_request_id = l_session.altered_pa_request_id
          )
--	  and NVL(ipv.business_group_id,0)=NVL(eli.business_group_id,0)
	  and (ipv.business_group_id is null or ipv.business_group_id=bg_id)
          order by 1 desc;
Line: 2018

    select gev.screen_entry_value
    from   ghr_element_entry_values_h_v gev
    where  gev.element_entry_id = l_element_entry_id
    and    gev.input_value_id   = l_input_value_id
    and    gev.pa_request_id    = l_pa_request_id;
Line: 2026

     select  object_version_number
     from    pay_element_entries_f
     where   element_entry_id = l_element_entry_id
     and     p_effective_date
     between effective_start_date and effective_end_date;
Line: 2036

      select eev.element_entry_value_id
	  from pay_input_values_f ipv,
	       pay_element_entries_f ele,
	       pay_element_entry_values_f eev
	 where trunc(p_effective_date) between ipv.effective_start_date
				   and ipv.effective_end_date
	   and trunc(p_effective_date) between ele.effective_start_date
				   and ele.effective_end_date
	   and trunc(p_effective_date) between eev.effective_start_date
				   and eev.effective_end_date
	   and ipv.element_type_id=p_element_type_id
	   and ipv.input_value_id = eev.input_value_id
	   and ele.assignment_id = p_assignment_id
	   and ele.element_entry_id + 0 = eev.element_entry_id
	   and upper(ipv.name) = upper(p_input_value_name)
	   and (ipv.business_group_id is NULL or ipv.business_group_id=p_bg_id);
Line: 2054

       Select distinct business_group_id bg
       from per_assignments_f
       where assignment_id = p_assignment_id
       and   p_eff_date between effective_start_date
             and effective_end_date;
Line: 2238

		select 	*
		from 		per_addresses
		where 	rowid = p_rowid;
Line: 2247

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 2304

		select 	*
		from 		per_person_analyses
		where 	rowid = p_rowid;
Line: 2312

            which will be the post-update record. So if the procedure was
            passed with p_row_id parameter it'll always return the
            post-update record.
            */
		hr_utility.set_location( l_proc, 10);
Line: 2361

   ,p_program_update_date          out nocopy     date
   ,p_poei_attribute_category      out nocopy     varchar2
   ,p_poei_attribute1              out nocopy     varchar2
   ,p_poei_attribute2              out nocopy     varchar2
   ,p_poei_attribute3              out nocopy     varchar2
   ,p_poei_attribute4              out nocopy     varchar2
   ,p_poei_attribute5              out nocopy     varchar2
   ,p_poei_attribute6              out nocopy     varchar2
   ,p_poei_attribute7              out nocopy     varchar2
   ,p_poei_attribute8              out nocopy     varchar2
   ,p_poei_attribute9              out nocopy     varchar2
   ,p_poei_attribute10             out nocopy     varchar2
   ,p_poei_attribute11             out nocopy     varchar2
   ,p_poei_attribute12             out nocopy     varchar2
   ,p_poei_attribute13             out nocopy     varchar2
   ,p_poei_attribute14             out nocopy     varchar2
   ,p_poei_attribute15             out nocopy     varchar2
   ,p_poei_attribute16             out nocopy     varchar2
   ,p_poei_attribute17             out nocopy     varchar2
   ,p_poei_attribute18             out nocopy     varchar2
   ,p_poei_attribute19             out nocopy     varchar2
   ,p_poei_attribute20             out nocopy     varchar2
   ,p_poei_information_category    out nocopy     varchar2
   ,p_poei_information1            out nocopy     varchar2
   ,p_poei_information2            out nocopy     varchar2
   ,p_poei_information3            out nocopy     varchar2
   ,p_poei_information4            out nocopy     varchar2
   ,p_poei_information5            out nocopy     varchar2
   ,p_poei_information6            out nocopy     varchar2
   ,p_poei_information7            out nocopy     varchar2
   ,p_poei_information8            out nocopy     varchar2
   ,p_poei_information9            out nocopy     varchar2
   ,p_poei_information10           out nocopy     varchar2
   ,p_poei_information11           out nocopy     varchar2
   ,p_poei_information12           out nocopy     varchar2
   ,p_poei_information13           out nocopy     varchar2
   ,p_poei_information14           out nocopy     varchar2
   ,p_poei_information15           out nocopy     varchar2
   ,p_poei_information16           out nocopy     varchar2
   ,p_poei_information17           out nocopy     varchar2
   ,p_poei_information18           out nocopy     varchar2
   ,p_poei_information19           out nocopy     varchar2
   ,p_poei_information20           out nocopy     varchar2
   ,p_poei_information21           out nocopy     varchar2
   ,p_poei_information22           out nocopy     varchar2
   ,p_poei_information23           out nocopy     varchar2
   ,p_poei_information24           out nocopy     varchar2
   ,p_poei_information25           out nocopy     varchar2
   ,p_poei_information26           out nocopy     varchar2
   ,p_poei_information27           out nocopy     varchar2
   ,p_poei_information28           out nocopy     varchar2
   ,p_poei_information29           out nocopy     varchar2
   ,p_poei_information30           out nocopy     varchar2
   ,p_object_version_number        out nocopy     number
   ,p_last_update_date             out nocopy     date
   ,p_last_updated_by              out nocopy     number
   ,p_last_update_login            out nocopy     number
   ,p_created_by                   out nocopy     number
   ,p_creation_date                out nocopy     date
   ,p_result_code                  out nocopy     varchar2
 )
 Is
   r_poi          per_position_extra_info%rowtype;
Line: 2440

          p_program_update_date         :=   r_poi.program_update_date;
Line: 2494

          p_last_update_date            :=   r_poi.last_update_date;
Line: 2495

          p_last_updated_by             :=   r_poi.last_updated_by;
Line: 2496

          p_last_update_login           :=   r_poi.last_update_login;
Line: 2518

		select 	*
		from 	hr_all_positions_f
		where 	position_id = p_position_id
                  and   p_date_effective between effective_start_date and
                                                 effective_end_date;
Line: 2525

		select 	*
		from 		hr_all_positions_f
		where 	rowid = p_rowid;
Line: 2530

      	select  object_version_number
            from    hr_all_positions
            where   position_id = p_position_id
              and   p_date_effective between effective_start_date and
                                             effective_end_date;
Line: 2537

		select 	date_end
		from 		hr_all_positions_f
		where		position_id = p_position_id
                  and p_date_effective between effective_start_date and
                                               effective_end_date;
Line: 2605

   ,p_program_update_date          out nocopy     date
   ,p_pei_attribute_category       out nocopy     varchar2
   ,p_pei_attribute1               out nocopy     varchar2
   ,p_pei_attribute2               out nocopy     varchar2
   ,p_pei_attribute3               out nocopy     varchar2
   ,p_pei_attribute4               out nocopy     varchar2
   ,p_pei_attribute5               out nocopy     varchar2
   ,p_pei_attribute6               out nocopy     varchar2
   ,p_pei_attribute7               out nocopy     varchar2
   ,p_pei_attribute8               out nocopy     varchar2
   ,p_pei_attribute9               out nocopy     varchar2
   ,p_pei_attribute10              out nocopy     varchar2
   ,p_pei_attribute11              out nocopy     varchar2
   ,p_pei_attribute12              out nocopy     varchar2
   ,p_pei_attribute13              out nocopy     varchar2
   ,p_pei_attribute14              out nocopy     varchar2
   ,p_pei_attribute15              out nocopy     varchar2
   ,p_pei_attribute16              out nocopy     varchar2
   ,p_pei_attribute17              out nocopy     varchar2
   ,p_pei_attribute18              out nocopy     varchar2
   ,p_pei_attribute19              out nocopy     varchar2
   ,p_pei_attribute20              out nocopy     varchar2
   ,p_pei_information_category     out nocopy     varchar2
   ,p_pei_information1              out nocopy     varchar2
   ,p_pei_information2             out nocopy     varchar2
   ,p_pei_information3             out nocopy     varchar2
   ,p_pei_information4             out nocopy     varchar2
   ,p_pei_information5             out nocopy     varchar2
   ,p_pei_information6             out nocopy     varchar2
   ,p_pei_information7             out nocopy     varchar2
   ,p_pei_information8             out nocopy     varchar2
   ,p_pei_information9             out nocopy     varchar2
   ,p_pei_information10            out nocopy     varchar2
   ,p_pei_information11            out nocopy     varchar2
   ,p_pei_information12            out nocopy     varchar2
   ,p_pei_information13            out nocopy     varchar2
   ,p_pei_information14            out nocopy     varchar2
   ,p_pei_information15            out nocopy     varchar2
   ,p_pei_information16            out nocopy     varchar2
   ,p_pei_information17            out nocopy     varchar2
   ,p_pei_information18            out nocopy     varchar2
   ,p_pei_information19            out nocopy     varchar2
   ,p_pei_information20            out nocopy     varchar2
   ,p_pei_information21            out nocopy     varchar2
   ,p_pei_information22            out nocopy     varchar2
   ,p_pei_information23            out nocopy     varchar2
   ,p_pei_information24            out nocopy     varchar2
   ,p_pei_information25            out nocopy     varchar2
   ,p_pei_information26            out nocopy     varchar2
   ,p_pei_information27            out nocopy     varchar2
   ,p_pei_information28            out nocopy     varchar2
   ,p_pei_information29            out nocopy     varchar2
   ,p_pei_information30            out nocopy     varchar2
   ,p_object_version_number        out nocopy     number
   ,p_last_update_date             out nocopy     date
   ,p_last_updated_by              out nocopy     number
   ,p_last_update_login            out nocopy     number
   ,p_created_by                   out nocopy     number
   ,p_creation_date                out nocopy     date
   ,p_result_code                  out nocopy     varchar2
 )
 Is
   r_pei          per_people_extra_info%rowtype;
Line: 2685

          p_program_update_date        :=   r_pei.program_update_date;
Line: 2739

          p_last_update_date           :=   r_pei.last_update_date;
Line: 2740

          p_last_updated_by            :=   r_pei.last_updated_by;
Line: 2741

          p_last_update_login          :=   r_pei.last_update_login;
Line: 2755

   ,p_program_update_date          out nocopy     date
   ,p_aei_attribute_category       out nocopy     varchar2
   ,p_aei_attribute1               out nocopy     varchar2
   ,p_aei_attribute2               out nocopy     varchar2
   ,p_aei_attribute3               out nocopy     varchar2
   ,p_aei_attribute4               out nocopy     varchar2
   ,p_aei_attribute5               out nocopy     varchar2
   ,p_aei_attribute6               out nocopy     varchar2
   ,p_aei_attribute7               out nocopy     varchar2
   ,p_aei_attribute8               out nocopy     varchar2
   ,p_aei_attribute9               out nocopy     varchar2
   ,p_aei_attribute10              out nocopy     varchar2
   ,p_aei_attribute11              out nocopy     varchar2
   ,p_aei_attribute12              out nocopy     varchar2
   ,p_aei_attribute13              out nocopy     varchar2
   ,p_aei_attribute14              out nocopy     varchar2
   ,p_aei_attribute15              out nocopy     varchar2
   ,p_aei_attribute16              out nocopy     varchar2
   ,p_aei_attribute17              out nocopy     varchar2
   ,p_aei_attribute18              out nocopy     varchar2
   ,p_aei_attribute19              out nocopy     varchar2
   ,p_aei_attribute20              out nocopy     varchar2
   ,p_aei_information_category     out nocopy     varchar2
   ,p_aei_information1             out nocopy     varchar2
   ,p_aei_information2             out nocopy     varchar2
   ,p_aei_information3             out nocopy     varchar2
   ,p_aei_information4             out nocopy     varchar2
   ,p_aei_information5             out nocopy     varchar2
   ,p_aei_information6             out nocopy     varchar2
   ,p_aei_information7             out nocopy     varchar2
   ,p_aei_information8             out nocopy     varchar2
   ,p_aei_information9             out nocopy     varchar2
   ,p_aei_information10            out nocopy     varchar2
   ,p_aei_information11            out nocopy     varchar2
   ,p_aei_information12            out nocopy     varchar2
   ,p_aei_information13            out nocopy     varchar2
   ,p_aei_information14            out nocopy     varchar2
   ,p_aei_information15            out nocopy     varchar2
   ,p_aei_information16            out nocopy     varchar2
   ,p_aei_information17            out nocopy     varchar2
   ,p_aei_information18            out nocopy     varchar2
   ,p_aei_information19            out nocopy     varchar2
   ,p_aei_information20            out nocopy     varchar2
   ,p_aei_information21            out nocopy     varchar2
   ,p_aei_information22            out nocopy     varchar2
   ,p_aei_information23            out nocopy     varchar2
   ,p_aei_information24            out nocopy     varchar2
   ,p_aei_information25            out nocopy     varchar2
   ,p_aei_information26            out nocopy     varchar2
   ,p_aei_information27            out nocopy     varchar2
   ,p_aei_information28            out nocopy     varchar2
   ,p_aei_information29            out nocopy     varchar2
   ,p_aei_information30            out nocopy     varchar2
   ,p_object_version_number        out nocopy     number
   ,p_last_update_date             out nocopy     date
   ,p_last_updated_by              out nocopy     number
   ,p_last_update_login            out nocopy     number
   ,p_created_by                   out nocopy     number
   ,p_creation_date                out nocopy     date
   ,p_result_code                  out nocopy     varchar2
 )
 Is
   r_aei          per_assignment_extra_info%rowtype;
Line: 2835

          p_program_update_date        :=   r_aei.program_update_date;
Line: 2889

          p_last_update_date           :=   r_aei.last_update_date;
Line: 2890

          p_last_updated_by            :=   r_aei.last_updated_by;
Line: 2891

          p_last_update_login          :=   r_aei.last_update_login;
Line: 2917

  select    flx.id_flex_num
  from      fnd_id_flex_structures_tl flx
  where     flx.id_flex_code           = 'PEA'  --
  and       flx.application_id         =  800   --
  and       flx.id_flex_structure_name =  p_structure_name
  and       flx.language               =  'US';
Line: 2927

   select  TO_NUMBER(gan.INFORMATION1) person_analysis_id,
	   FND_DATE.CANONICAL_TO_DATE(gan.information9) date_from,
           FND_DATE.CANONICAL_TO_DATE(gan.information10) date_to ,
           pa_request_id,
           TO_NUMBER(gan.INFORMATION6) analysis_Criteria_id
   from    ghr_pa_history gan ,                         -- ghr_person_analyses_h_v gan,
           per_person_analyses  per
   where   gan.table_name              = 'PER_PERSON_ANALYSES'
   and     TO_NUMBER(gan.information7) =  p_person_id                   -- information7 holds person_id
   and     per.person_id	       =  TO_NUMBER(gan.information7)
   and     TO_NUMBER(gan.INFORMATION11)=  l_id_flex_num                 -- information11 holds id_flex_Number
   and     per.id_flex_num             =  TO_NUMBER(gan.INFORMATION11)
   and     to_char(per.person_analysis_id)  =  gan.INFORMATION1     -- information1 holds person_analysis_id (3206581)
   and     p_effective_date
   between nvl(fnd_date.canonical_to_date(gan.information9),p_effective_date)
   and     nvl(fnd_date.canonical_to_date(gan.information10),p_effective_date) -- information9,information10 holds date_from,date_to
   order  by 2,1 desc, pa_history_id asc;
Line: 2950

    select object_version_number
    from   per_person_analyses pan
    where  person_analysis_id = l_person_analysis_id;
Line: 2955

    select pea.analysis_criteria_id,
           pea.segment1,
           pea.segment2,
           pea.segment3,
           pea.segment4,
           pea.segment5,
           pea.segment6,
           pea.segment7,
           pea.segment8,
           pea.segment9,
           pea.segment10,
           pea.segment11,
           pea.segment12,
           pea.segment13,
           pea.segment14,
           pea.segment15,
           pea.segment16,
           pea.segment17,
           pea.segment18,
           pea.segment19,
           pea.segment20,
           pea.segment21,
           pea.segment22,
           pea.segment23,
           pea.segment24,
           pea.segment25,
           pea.segment26,
           pea.segment27,
           pea.segment28,
           pea.segment29,
           pea.segment30
   from    per_analysis_Criteria pea
   where   pea.analysis_Criteria_id =  l_analysis_criteria_id
   and     p_effective_date
   between nvl(pea.start_date_active,p_effective_date)
   and     nvl(pea.end_date_active,p_effective_date);
Line: 3088

	select min(pa_history_id)
	from ghr_pa_history
	where pa_request_id =
		(select 	min(pa_request_id)
		from 		ghr_pa_requests
		connect by 	pa_request_id = prior altered_pa_request_id
		start with 	pa_request_id = cp_pa_req_id)
	and nature_of_action_id = cp_noa_id;
Line: 3098

		select      aei.assignment_extra_info_id
		from        per_assignment_extra_info aei
		where       aei.assignment_id      =  p_assignment_id
		and         aei.information_type   =  p_information_type;
Line: 3155

	select min(pa_history_id)
	from ghr_pa_history
	where pa_request_id =
		(select 	min(pa_request_id)
		from 		ghr_pa_requests
		connect by 	pa_request_id = prior altered_pa_request_id
		start with 	pa_request_id = cp_pa_req_id)
	and nature_of_action_id = cp_noa_id;