31:
32: IF (l_delete_document_flag = 'Y') THEN
33: -- need to delete from each sub-table holding the data
34: -- doing this in a loop to reduce amount of code
35: DELETE FROM fnd_documents_short_text
36: WHERE media_id IN
37: (SELECT fd.media_id
38: FROM fnd_documents_tl fdtl,
39: fnd_documents fd,
114: ELSIF X_pk3_value IS NULL THEN -- performance change IF
115: IF (l_delete_document_flag = 'Y') THEN
116: -- need to delete from each sub-table holding the data
117: -- doing this in a loop to reduce amount of code
118: DELETE FROM fnd_documents_short_text
119: WHERE media_id IN
120: (SELECT fd.media_id
121: FROM fnd_documents_tl fdtl,
122: fnd_documents fd,
204: ELSIF X_pk4_value IS NULL THEN -- performance change if
205: IF (l_delete_document_flag = 'Y') THEN
206: -- need to delete from each sub-table holding the data
207: -- doing this in a loop to reduce amount of code
208: DELETE FROM fnd_documents_short_text
209: WHERE media_id IN
210: (SELECT fd.media_id
211: FROM fnd_documents_tl fdtl,
212: fnd_documents fd,
301: ELSE -- performance change if
302: IF (l_delete_document_flag = 'Y') THEN
303: -- need to delete from each sub-table holding the data
304: -- doing this in a loop to reduce amount of code
305: DELETE FROM fnd_documents_short_text
306: WHERE media_id IN
307: (SELECT fd.media_id
308: FROM fnd_documents_tl fdtl,
309: fnd_documents fd,
670:
671:
672: CURSOR shorttext (mid NUMBER) IS
673: SELECT short_text
674: FROM fnd_documents_short_text
675: WHERE media_id = mid;
676:
677: CURSOR longtext (mid NUMBER) IS
678: SELECT long_text
805: OPEN shorttext(docrec.media_id);
806: FETCH shorttext INTO short_text_tmp;
807: CLOSE shorttext;
808:
809: INSERT INTO fnd_documents_short_text (
810: media_id,
811: short_text)
812: VALUES (
813: media_id_tmp,