315: -- delete any orphaned rows --
316: ------------------------------
317: delete from fnd_lobs l
318: where program_name = 'FND_HELP'
319: and not exists (select 'x' from fnd_help_documents d
320: where l.file_id = d.file_id);
321:
322: delete from fnd_help_documents d
323: where not exists (select 'x' from fnd_lobs l
318: where program_name = 'FND_HELP'
319: and not exists (select 'x' from fnd_help_documents d
320: where l.file_id = d.file_id);
321:
322: delete from fnd_help_documents d
323: where not exists (select 'x' from fnd_lobs l
324: where l.file_id = d.file_id);
325:
326: delete from fnd_help_targets t
323: where not exists (select 'x' from fnd_lobs l
324: where l.file_id = d.file_id);
325:
326: delete from fnd_help_targets t
327: where not exists (select 'x' from fnd_help_documents d
328: where t.file_id = d.file_id);
329: commit;
330: end help_cleanup;
331: -----------------------------------------------------------------------------