rem
rem $Id: droprep.sql,v 1.1 1998/11/03 02:46:34 yxia Exp $
rem

rem  +------------------------------------------------------------------+
rem  |  SRW@_DROP.SQL -- DROP REPORTS FROM SQL*PLUS                      |
rem  |                                                                  |
rem  |  This script is used to drop a report without having to use the  |
rem  |  SQLREP interface.  It is a SQL*Plus script, and will not run    |
rem  |  under SQL*DBA.                                                  |
rem  +------------------------------------------------------------------+

accept rname char prompt 'Report name to Drop: ';

set verify off;
set feedback off;

delete from srw2_anchor where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_boilerplate where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_text_segment where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_button where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_column where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_data_model  where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_field where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_frame where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_group  where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_link where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_layout where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_body_location  where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_layout_group where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_matrix where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_og_document where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_ogd_column_map where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_param_form where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_query where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_element where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from srw2_display_tag where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_access where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_library where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_ltext where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_lraw where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_plsql where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_comment where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from tool_depend where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from ROSSTRINGS where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

delete from vg_color where modid in
  (select modid from tool_module where owner=user and
   upper(modname) like upper('&rname'));

column modname heading 'Reports Deleted'

select modname from tool_module where owner=user and
   upper(modname) like upper('&rname');

set feedback on;

delete from tool_module where owner=user and
   upper(modname) like upper('&rname');

set verify on;
