The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT igp_wz_temp_approve_s.NEXTVAL
FROM dual;
PROCEDURE update_template (
p_template_id igp_wz_templates.template_id%TYPE,
p_status VARCHAR2) IS
/******************************************************************
Created By : Prabhat Patel
Date Created By : 25-Feb-2004
Purpose : Procedure for Updating status of the Template
remarks :
Change History
Who When What
******************************************************************/
l_var NUMBER;
SELECT 1
FROM igp_wz_templates
WHERE template_id = cp_template_id;
UPDATE igp_wz_templates
SET template_status_code = p_status
WHERE template_id = p_template_id;
END update_template;
update_template(p_template_id, 'PENDING');
update_template(l_template_id, 'DRAFT');
update_template(l_template_id, 'PUBLISH');
SELECT usr.user_name, hz.person_last_name||', '||hz.person_first_name person_name, usr.email_address
FROM fnd_user usr, hz_parties hz
WHERE usr.user_id = cp_user_id AND
usr.person_party_id = hz.party_id;
SELECT hz.party_name
FROM fnd_user usr, hz_parties hz
WHERE usr.user_name = cp_approver AND
usr.person_party_id = hz.party_id;
SELECT temp.template_name name,
NVL(temp.template_title,nbsp) title,
lk.meaning type,
NVL(temp.description,nbsp) description,
NVL(TO_CHAR(temp.expiry_date),nbsp) expiry_date,
created_by
FROM igp_wz_templates temp, igp_lookup_values lk
WHERE temp.template_id = cp_template_id AND
temp.template_type_code = lk.lookup_code AND
lk.lookup_type = cp_lookup_type;
-- If everything is fine call the procedure to update the status to pending
pending_status (l_template_id);