The following lines contain the word 'select', 'insert', 'update' or 'delete':
v_delete_snapshot_ind IGS_EN_ST_SPSHT_CTL.delete_snapshot_ind%TYPE;
SELECT essc.delete_snapshot_ind
FROM IGS_EN_ST_SPSHT_CTL essc
WHERE essc.snapshot_dt_time = cp_snapshot_dt_time;
SELECT gsc.submission_yr
FROM IGS_ST_GVT_SPSHT_CTL gsc
WHERE gsc.ess_snapshot_dt_time = cp_snapshot_dt_time AND
gsc.submission_yr <> cp_submission_yr;
-- An Enrolment Statistics Snapshot which is marked for delete cannot
-- be used by a Government Snapshot.
-- An Enrolment Statistics Snapshot which is used by another Government
-- Snapshot submission in another year cannot be used by a Government
-- Snapshot.
p_message_name := NULL;
FETCH c_essc INTO v_delete_snapshot_ind;
IF(v_delete_snapshot_ind = 'Y') THEN
CLOSE c_essc;
SELECT gsc.submission_yr
FROM IGS_ST_GVT_SPSHT_CTL gsc
WHERE gsc.submission_yr = cp_submission_yr AND
gsc.submission_number = cp_submission_number AND
gsc.completion_dt IS NOT NULL;
-- Validate update of the IGS_ST_GVT_SPSHT_CTL.ess_snapshot_dt_time.
-- The IGS_ST_GVT_SPSHT_CTL.ess_snapshot_dt_time cannot be updated if the
-- govt_snapshot_ctlcompletion_dt is set.
p_message_name := NULL;