The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT 1 INTO dummy FROM sys.dual WHERE NOT EXISTS
(SELECT 1 FROM pa_cost_base_cost_codes cbv
WHERE cbv.cost_base = c_base
AND cbv.cost_base_type = c_base_type
AND cbv.cost_plus_structure = cp_structure)
AND NOT EXISTS
(SELECT 1 FROM pa_cost_base_exp_types cbv
WHERE cbv.cost_base = c_base
AND cbv.cost_base_type = c_base_type
AND cbv.cost_plus_structure = cp_structure);
SELECT 1 INTO dummy FROM sys.dual WHERE NOT EXISTS
(SELECT 1
FROM pa_ind_rate_sch_revisions
WHERE cost_plus_structure = cp_structure
AND compiled_date IS NOT NULL);
SELECT 1 INTO dummy FROM sys.dual WHERE NOT EXISTS
(SELECT 1 FROM pa_cost_base_cost_codes cbicc,
pa_cost_base_exp_types cbet
WHERE ( (cbicc.cost_plus_structure = cp_structure)
and (cbicc.cost_base = c_base)
and (cbicc.cost_base_type = c_base_type))
or ( (cbet.cost_plus_structure = cp_structure)
and (cbet.cost_base = c_base)
and (cbet.cost_base_type = c_base_type)));
procedure cascade_delete(cp_structure IN varchar2,
c_base IN varchar2,
c_base_type IN varchar2,
status IN OUT NOCOPY number)
is
begin
DELETE pa_cost_base_cost_codes
WHERE cost_plus_structure = cp_structure
AND cost_base = c_base
AND cost_base_type = c_base_type;
DELETE pa_cost_base_exp_types
WHERE cost_plus_structure = cp_structure
AND cost_base = c_base
AND cost_base_type = c_base_type;
end cascade_delete;