1006: into l_delete_permitted
1007: from sys.dual
1008: where not exists (
1009: select null
1010: from per_absence_attendances a
1011: where a.person_id = P_PERSON_ID);
1012: --
1013: exception
1014: when NO_DATA_FOUND then
1026: into l_delete_permitted
1027: from sys.dual
1028: where not exists (
1029: select null
1030: from per_absence_attendances a
1031: where a.authorising_person_id = P_PERSON_ID
1032: or a.replacement_person_id = P_PERSON_ID);
1033: --
1034: exception
2120: end if;
2121: --
2122: begin
2123: --
2124: delete from per_absence_attendances a
2125: where a.person_id = P_PERSON_ID;
2126: --
2127: exception
2128: when NO_DATA_FOUND then
2136: end if;
2137: --
2138: begin
2139: --
2140: update per_absence_attendances a
2141: set a.authorising_person_id = null
2142: where a.authorising_person_id = P_PERSON_ID;
2143: --
2144: exception
2153: end if;
2154: --
2155: begin
2156: --
2157: update per_absence_attendances a
2158: set a.replacement_person_id = null
2159: where a.replacement_person_id = P_PERSON_ID;
2160: --
2161: exception