The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT nvl(max(fad.seq_num),0)+10
FROM fnd_attached_documents fad,
fnd_documents fd
WHERE fad.pk1_value = to_char(x_incident_id)
AND fd.document_id = fad.document_id
AND EXISTS
(SELECT 1
FROM fnd_document_categories_tl cat_tl
WHERE cat_tl.category_id = fd.category_id
--AND cat_tl.user_name = p_category_user_name
);
SELECT category_id
FROM fnd_document_categories_tl
WHERE user_name = p_category_user_name;
select fnd_lobs_s.nextval
from dual;
select fnd_documents_short_text_s.nextval
from dual;
select userenv('LANG')
from dual;
select 1
from fnd_lobs
where file_id = p_file_id;
RECORD_NOT_INSERTED EXCEPTION;
INSERT INTO fnd_lobs(file_id, file_name, file_content_type, file_data, upload_date, language, file_format)
VALUES (l_fnd_lobs_id, p_file_name, p_file_content_type, empty_blob(), SYSDATE, l_language, 'binary')
RETURN file_data into l_attachment_loc;
raise RECORD_NOT_INSERTED;
INSERT INTO fnd_documents_short_text(media_id, short_text)
VALUES (l_fnd_text_id, p_text)
RETURN short_text into l_attachment_text;
WHEN RECORD_NOT_INSERTED THEN
x_return_status := FND_API.G_RET_STS_ERROR;
p_error_msg := 'Record not inserted';