home *** CD-ROM | disk | FTP | other *** search
- 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 srw_ste where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_query where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_fkey where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_group where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_field where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_summary where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_text where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_text_long where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_param where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- delete from srw_grant where appid in
- (select appid from srw_report where owner=user and
- upper(report_name) like upper('&rname'));
-
- column report_name heading 'Reports Deleted'
-
- select report_name from srw_report where owner=user and
- upper(report_name) like upper('&rname');
-
- set feedback on;
-
- delete from srw_report where owner=user and
- upper(report_name) like upper('&rname');
-
- set verify on;
-