[Home] [Help]
27: WHERE pa_request_id = p_pa_request_id;
28:
29: CURSOR cur_temp_step IS
30: SELECT rei_information3 temp_step
31: FROM ghr_pa_request_extra_info
32: WHERE pa_request_id = p_pa_request_id
33: AND information_type = 'GHR_US_PAR_RG_TEMP_PROMO';
34:
35: --
59: AND p_effective_date
60: BETWEEN NVL(fnd_date.canonical_to_date(pei2.pei_information1),p_effective_date)
61: AND NVL(fnd_date.canonical_to_date(pei2.pei_information2),p_effective_date)
62: AND to_char(pei2.person_extra_info_id) NOT IN (SELECT rei_information3
63: FROM ghr_pa_request_extra_info rei
64: WHERE pa_request_id = p_pa_request_id
65: AND (rei_information5 is null OR rei_information5 = 'Y')
66: --Bug # 5584845
67: AND ((information_type = 'GHR_US_PAR_TERM_RET_GRADE'
66: --Bug # 5584845
67: AND ((information_type = 'GHR_US_PAR_TERM_RET_GRADE'
68: AND
69: fnd_date.canonical_to_date(rei_information6) = (select MIN (NVL(fnd_date.canonical_to_date(rei2.rei_information6),p_effective_date) )
70: FROM ghr_pa_request_extra_info rei2
71: WHERE pa_request_id = rei.pa_request_id
72: AND information_type = rei.information_type)
73: )
74: OR
76: 'GHR_US_PAR_TERM_RG_POSN_CHG')))
77: --Bug # 5584845
78: )
79: AND to_char(pei.person_extra_info_id) NOT IN (SELECT rei_information3
80: FROM ghr_pa_request_extra_info rei
81: WHERE pa_request_id = p_pa_request_id
82: AND (rei_information5 is null OR rei_information5 = 'Y')
83: --Bug # 5584845
84: AND ((information_type = 'GHR_US_PAR_TERM_RET_GRADE'
83: --Bug # 5584845
84: AND ((information_type = 'GHR_US_PAR_TERM_RET_GRADE'
85: AND
86: fnd_date.canonical_to_date(rei_information6) = (select MIN (NVL(fnd_date.canonical_to_date(rei2.rei_information6),p_effective_date) )
87: FROM ghr_pa_request_extra_info rei2
88: WHERE pa_request_id = rei.pa_request_id
89: AND information_type = rei.information_type)
90: )
91: OR
248: WHERE pei2.person_id = p_person_id
249: AND pei2.information_type = 'GHR_US_RETAINED_GRADE'
250: AND NVL(fnd_date.canonical_to_date(pei2.pei_information2),p_effective_date) < p_effective_date
251: AND pei2.person_extra_info_id NOT IN (SELECT rei_information3
252: FROM ghr_pa_request_extra_info
253: WHERE pa_request_id = p_pa_request_id
254: AND (rei_information5 is null OR rei_information5 = 'Y')
255: AND information_type in ('GHR_US_PAR_TERM_RET_GRADE',
256: 'GHR_US_PAR_TERM_RG_PROMO',
257: 'GHR_US_PAR_TERM_RG_POSN_CHG')
258: )
259: )
260: AND pei.person_extra_info_id NOT IN (SELECT rei_information3
261: FROM ghr_pa_request_extra_info
262: WHERE pa_request_id = p_pa_request_id
263: AND information_type in ( 'GHR_US_PAR_TERM_RET_GRADE',
264: 'GHR_US_PAR_TERM_RG_PROMO',
265: 'GHR_US_PAR_TERM_RG_POSN_CHG')