1472: where position_id = p_position_id;
1473:
1474: cursor c2 is
1475: select fnd_date.canonical_to_date(poei_information3), fnd_date.canonical_to_date(poei_information4)
1476: from per_position_extra_info
1477: where information_type = 'PER_OVERLAP'
1478: and position_id = p_position_id;
1479:
1480: begin
1513: select fnd_date.canonical_to_date(poei_information3) poei_information3,
1514: nvl(fnd_date.canonical_to_date(poei_information4),
1515: hr_general.end_of_time) poei_information4,
1516: poei_information5, poei_information6, poei_information7
1517: from per_position_extra_info
1518: where position_id = p_position_id
1519: and information_type = 'PER_RESERVED';
1520:
1521: begin
1655: l_position_family varchar2(100);
1656: l_chk boolean := false;
1657: cursor c1 is
1658: select poei_information3
1659: from per_position_extra_info
1660: where position_id = p_position_id
1661: and information_type = 'PER_FAMILY'
1662: and poei_information3 in ('ACADEMIC','FACULTY');
1663: begin
1681: l_chk boolean := false;
1682: l_position_extra_info_id number := nvl(p_rec.position_extra_info_id,-1);
1683: cursor c1 is
1684: select poei_information3
1685: from per_position_extra_info
1686: where position_id = p_rec.position_id
1687: and position_extra_info_id <> l_position_extra_info_id
1688: and information_type = 'PER_FAMILY'
1689: and poei_information3 in ('ACADEMIC','FACULTY');
1735:
1736: cursor c2 is
1737: -- Start changes for bug 10220040
1738: /*select 'x'
1739: from per_position_extra_info
1740: where p_assignment_start_date
1741: between fnd_date.canonical_to_date(poei_information3)
1742: and fnd_date.canonical_to_date(poei_information4)
1743: -- Start changes for bug 10220040
1751: fnd_date.canonical_to_date(poei_information3) effective_start_date,
1752: fnd_date.canonical_to_date(poei_information4) effective_end_date
1753: from (
1754: select poei_information3, poei_information4
1755: from per_position_extra_info
1756: where information_type = 'PER_OVERLAP'
1757: and position_id = p_position_id)
1758: where p_assignment_start_date
1759: between fnd_date.canonical_to_date(poei_information3)
1909:
1910: cursor c1 is
1911: select poei_information3,
1912: poei_information4
1913: from per_position_extra_info
1914: where position_id = p_position_id
1915: and information_type = 'PER_SEASONAL';
1916:
1917: begin
1966: l_dummy varchar2(1);
1967: l_position_id number := nvl(p_position_id,-1);
1968: cursor c_seasonal is
1969: select 'X'
1970: from per_position_extra_info
1971: where position_id = l_position_id
1972: and information_type = 'PER_SEASONAL';
1973: begin
1974: open c_seasonal;
1985: l_dummy varchar2(1);
1986: l_position_id number := nvl(p_position_id,-1);
1987: cursor c_overlap is
1988: select 'X'
1989: from per_position_extra_info
1990: where position_id = l_position_id
1991: and information_type = 'PER_OVERLAP';
1992: begin
1993: open c_overlap;
2851: -- Cursor changed for bug 8727415
2852: /*********
2853: cursor c1(p_person_id number, p_position_id number, p_effective_date date) is
2854: select to_number(poei_information6,'99999999.99') fte
2855: from per_position_extra_info
2856: where p_effective_date
2857: between fnd_date.canonical_to_date(poei_information3)
2858: and nvl(fnd_date.canonical_to_date(poei_information4),hr_general.end_of_time)
2859: and position_id = p_position_id
2863:
2864: cursor c1(p_person_id number, p_position_id number, p_effective_date date) is
2865: select to_number(pos.poei_information6,'99999999.99') fte
2866: from
2867: (SELECT poei_information6, poei_information3, poei_information4, ROWNUM rn from per_position_extra_info
2868: WHERE position_id = p_position_id
2869: and information_type= 'PER_RESERVED'
2870: and poei_information5 = p_person_id) pos
2871: where p_effective_date between fnd_date.canonical_to_date(poei_information3)
2904: -- cursor changed for 8727415
2905: /******
2906: cursor c1(p_position_id number, p_effective_date date) is
2907: select sum(to_number(poei_information6,'99999999.99')) fte
2908: from per_position_extra_info
2909: where p_effective_date
2910: between fnd_date.canonical_to_date(poei_information3)
2911: and nvl(fnd_date.canonical_to_date(poei_information4),hr_general.end_of_time)
2912: and position_id = p_position_id
2913: and information_type= 'PER_RESERVED';
2914: *********/
2915: cursor c1(p_position_id number, p_effective_date date) is
2916: select sum(to_number(poei_information6,'99999999.99')) fte
2917: from ( SELECT poei_information6,poei_information3,poei_information4, ROWNUM rn from per_position_extra_info
2918: WHERE position_id = p_position_id
2919: and information_type= 'PER_RESERVED') pos
2920: where p_effective_date between fnd_date.canonical_to_date(poei_information3)
2921: and nvl(fnd_date.canonical_to_date(poei_information4),hr_general.end_of_time);
2967: -- cursor changed for 8727415
2968: /**********
2969: cursor c1(p_position_id number, p_effective_date date) is
2970: select poei_information5 person_id
2971: from per_position_extra_info
2972: where p_effective_date
2973: between fnd_date.canonical_to_date(poei_information3)
2974: and nvl(fnd_date.canonical_to_date(poei_information4),hr_general.end_of_time)
2975: and position_id = p_position_id
2978: *********/
2979: cursor c1(p_position_id number, p_effective_date date) is
2980: select poei_information5 person_id
2981: from ( SELECT poei_information5, poei_information3, poei_information4, ROWNUM rn
2982: FROM per_position_extra_info
2983: WHERE position_id = p_position_id
2984: and poei_information5 is not null
2985: and information_type= 'PER_RESERVED') pos
2986: where p_effective_date between fnd_date.canonical_to_date(poei_information3)
3468: -- cursor changed for Bug 8727415
3469: /*********
3470: cursor c1(p_position_id number, p_effective_date date, p_ex_position_extra_info_id number) is
3471: select sum(poei_information6) fte
3472: from per_position_extra_info
3473: where p_effective_date
3474: between fnd_date.canonical_to_date(poei_information3)
3475: and nvl(fnd_date.canonical_to_date(poei_information4),hr_general.end_of_time)
3476: and position_id = p_position_id
3479: *********/
3480: cursor c1(p_position_id number, p_effective_date date, p_ex_position_extra_info_id number) is
3481: select sum(poei_information6) fte
3482: from (SELECT poei_information6,poei_information3, poei_information4, ROWNUM rn
3483: FROM per_position_extra_info
3484: WHERE position_id = p_position_id
3485: and information_type= 'PER_RESERVED'
3486: and position_extra_info_id <> l_ex_position_extra_info_id) pei
3487: where p_effective_date between fnd_date.canonical_to_date(poei_information3)
3503: function poei_reserved_fte(p_position_extra_info_id number) return number is
3504: l_fte number;
3505: cursor c1(p_position_extra_info_id number) is
3506: select poei_information6
3507: from per_position_extra_info
3508: where position_extra_info_id = p_position_extra_info_id;
3509: begin
3510: if p_position_extra_info_id is not null then
3511: open c1(p_position_extra_info_id);
3545: and ast.per_system_status <> 'TERM_ASSIGN'
3546: and not exists (
3547: select null
3548: from (SELECT position_extra_info_id,poei_information3,poei_information4,poei_information5, ROWNUM rn -- changed for 8727415
3549: FROM per_position_extra_info
3550: where information_type= 'PER_RESERVED'
3551: and position_id = p_position_id ) pei
3552: where position_extra_info_id <> l_ex_position_extra_info_id
3553: and fnd_date.canonical_to_date(poei_information3) <= p_effective_date
3775:
3776: -- Start changes for bug 10262123
3777: cursor c_pos_reserved(p_position_id number, p_effective_date date) is
3778: select 'x'
3779: from (select /*+ INDEX(PER_POSITION_EXTRA_INFO PER_POSITION_EXTRA_INFO_N3)*/
3780: poei_information3,
3781: poei_information4
3782: from per_position_extra_info
3783: where information_type = 'PER_RESERVED'
3778: select 'x'
3779: from (select /*+ INDEX(PER_POSITION_EXTRA_INFO PER_POSITION_EXTRA_INFO_N3)*/
3780: poei_information3,
3781: poei_information4
3782: from per_position_extra_info
3783: where information_type = 'PER_RESERVED'
3784: and position_id = p_position_id)
3785: where p_effective_date
3786: between
3860: query of the cursor as a fix of bug 6409206 **/
3861: cursor c_pos_reserved(p_position_id number,
3862: p_effective_date date) is
3863: select 'x'
3864: from (select /*+ INDEX(PER_POSITION_EXTRA_INFO PER_POSITION_EXTRA_INFO_N3)*/
3865: fnd_date.canonical_to_date(poei_information3) poei_information3,
3866: nvl(fnd_date.canonical_to_date(poei_information4),
3867: hr_general.end_of_time) poei_information4
3868: from per_position_extra_info
3864: from (select /*+ INDEX(PER_POSITION_EXTRA_INFO PER_POSITION_EXTRA_INFO_N3)*/
3865: fnd_date.canonical_to_date(poei_information3) poei_information3,
3866: nvl(fnd_date.canonical_to_date(poei_information4),
3867: hr_general.end_of_time) poei_information4
3868: from per_position_extra_info
3869: where information_type = 'PER_RESERVED'
3870: and position_id = p_position_id)
3871: where p_effective_date <= poei_information4;
3872: --
3910: and asg.business_group_id = abv.business_group_id
3911: union
3912: select effective_start_date
3913: from (select fnd_date.canonical_to_date(poei_information3) effective_start_date
3914: from per_position_extra_info
3915: where position_id = p_position_id
3916: and information_type = 'PER_RESERVED')
3917: where effective_start_date >= p_validation_start_date
3918: union
3951: and asg.effective_start_date between p_validation_start_date and p_validation_end_date
3952: union
3953: select effective_start_date
3954: from (select fnd_date.canonical_to_date(poei_information3) effective_start_date
3955: from per_position_extra_info
3956: where position_id = p_position_id
3957: and information_type = 'PER_RESERVED')
3958: where effective_start_date >= p_validation_start_date
3959: union
4482: --
4483: cursor c1 is
4484: select sum(to_number(poei_information6,'99999999.99'))
4485: from (SELECT poei_information6,poei_information3, poei_information4,poei_information5, ROWNUM rn -- changed for 8727415
4486: FROM per_position_extra_info
4487: where information_type = 'PER_RESERVED'
4488: and position_id = p_position_id ) poei
4489: Where p_effective_start_date
4490: between fnd_date.canonical_to_date(poei_information3)
4506: and ast.per_system_status <> 'TERM_ASSIGN'
4507: and not exists
4508: ( select null
4509: from (SELECT poei_information3, poei_information4, poei_information5, ROWNUM rn -- changed for 8727415
4510: FROM per_position_extra_info
4511: where information_type = 'PER_RESERVED'
4512: and position_id = p_position_id) poei
4513: where p_effective_start_date
4514: between fnd_date.canonical_to_date(poei.poei_information3)