The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 'X'
FROM IGS_AD_CAT ac
WHERE ac.admission_cat = p_admission_cat AND
ac.closed_ind = 'Y';
SELECT closed_ind,
s_cal_cat
FROM IGS_CA_TYPE
WHERE cal_type = p_cal_type;
SELECT 'x'
FROM IGS_PS_OFR_OPT
WHERE course_cd = p_course_cd AND
version_number = p_version_number AND
cal_type = p_cal_type AND
(p_location_cd IS NULL OR
location_cd = p_location_cd) AND
(p_attendance_mode IS NULL OR
attendance_mode = p_attendance_mode) AND
(p_attendance_type IS NULL OR
attendance_type = p_attendance_type) AND
delete_flag = 'N';
SELECT 'X'
FROM IGS_PS_OFR_UNIT_SET cous,
IGS_EN_UNIT_SET us,
IGS_EN_UNIT_SET_STAT uss
WHERE cous.course_cd = p_course_cd AND
cous.crv_version_number = p_crv_version_number AND
cous.cal_type = p_cal_type AND
cous.unit_set_cd = p_unit_set_cd AND
cous.unit_set_cd = us.unit_set_cd AND
cous.us_version_number = us.version_number AND
us.unit_set_status = uss.unit_set_status AND
uss.s_unit_set_status = cst_active;
SELECT 'X'
FROM IGS_PS_PAT_OF_STUDY pos
WHERE pos.course_cd = p_course_cd AND
pos.version_number = p_version_number AND
pos.cal_type = p_cal_type AND
pos.sequence_number <> p_sequence_number AND
pos.location_cd IS NULL AND
pos.attendance_mode IS NULL AND
pos.attendance_type IS NULL AND
pos.unit_set_cd IS NULL AND
pos.admission_cal_type IS NULL AND
pos.admission_cat IS NULL;
SELECT 'X'
FROM IGS_PS_PAT_OF_STUDY pos
WHERE pos.course_cd = p_course_cd AND
pos.version_number = p_version_number AND
pos.cal_type = p_cal_type AND
pos.sequence_number <> p_sequence_number AND
((p_location_cd IS NULL AND
pos.location_cd IS NULL) OR
pos.location_cd = p_location_cd) AND
((p_attendance_mode IS NULL AND
pos.attendance_mode IS NULL) OR
pos.attendance_mode = p_attendance_mode) AND
((p_attendance_type IS NULL AND
pos.attendance_type IS NULL) OR
pos.attendance_type = p_attendance_type) AND
((p_unit_set_cd IS NULL AND
pos.unit_set_cd IS NULL) OR
pos.unit_set_cd = p_unit_set_cd) AND
((p_admission_cal_type IS NULL AND
pos.admission_cal_type IS NULL) OR
pos.admission_cal_type = p_admission_cal_type) AND
((p_admission_cat IS NULL AND
pos.admission_cat IS NULL) OR
pos.admission_cat = p_admission_cat);
--smaddali changed the select statement for bug#1838421 . it was selecting attendance_mode twice instead of
-- attendance_type , so changed the second attendance_mode to attendance_type
CURSOR c_pos3 IS
SELECT pos.location_cd,
pos.attendance_mode,
pos.attendance_type,
pos.unit_set_cd,
pos.admission_cal_type,
pos.admission_cat
FROM IGS_PS_PAT_OF_STUDY pos
WHERE pos.course_cd = p_course_cd AND
pos.version_number = p_version_number AND
pos.cal_type = p_cal_type AND
pos.sequence_number <> p_sequence_number AND
(pos.location_cd IS NOT NULL OR
pos.attendance_mode IS NOT NULL OR
pos.attendance_type IS NOT NULL OR
pos.unit_set_cd IS NOT NULL OR
pos.admission_cal_type IS NOT NULL OR
pos.admission_cat IS NOT NULL);
SELECT 'X'
FROM IGS_EN_UNIT_SET us,
IGS_EN_UNIT_SET_STAT uss
WHERE us.unit_set_cd = p_unit_set_cd AND
us.unit_set_status = uss.unit_set_status AND
uss.s_unit_set_status = 'ACTIVE';