set echo off
Rem  Copyright (c) 1998 by U.S. Environmental Protection Agency 
Rem    NAME
Rem      analyze.sql - <one-line expansion of the name>
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem    RETURNS
Rem 
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem    MODIFIED   (MM/DD/YY)
Rem     kchristian   07/01/98 -  comment out vms specific host command 
Rem     kchristian   07/01/98 -  Creation 
Rem     kchristian   07/01/98 -  Creation 
rem 
rem $Header: analyze.sql,v 1.0 1998/07/01 12:00:00 KCHRISTIAN Exp $ 
rem 
-- connect storet1/storet1
set termout on
set echo on
-- This Script (del5org.sql) Removes ALL Org IDs Rows from Schema Owner 
-- SQL Plus Environment Variables
set echo off
set verify off
set feedback off
set termout on
set time off
set timing off
set heading off
set linesize 300
set pagesize 0

show user

accept schema_user prompt 'Enter database username : '
accept connectstring prompt 'Enter database connect string :'
prompt 'Enter password for &schema_user@&connectstring:'
connect &schema_user@&connectstring

ACCEPT YOUR_ORG CHAR FORMAT A8 PROMPT 'Enter ORG_ID(UPPER CASE) to DELETE from all tables (CTRL-C to abort): '


PROMPT Your Session is currently connected as... USER/SCHEMA
show user
PROMPT This Script (del5org.sql) Removes ALL (&YOUR_ORG) Org IDs Rows from Schema Owner &schema_user
PROMPT Script Log File: D:\cdus\cdusrun\log\del_org_&YOUR_ORG..log
ACCEPT CONTINUE CHAR FORMAT A1 PROMPT 'Press <ENTER> To Continue an EXECUTE ORG_IDs size(K) (CTRL-C to abort): '
-- @D:\cdus\cdusrun\org5cdus.sql  
PROMPT This Script (del5org.sql) Removes ALL (&YOUR_ORG) Org IDs Rows from Schema Owner &schema_user
show user
PROMPT Script Log File: D:\cdus\cdusrun\log\del_org_&YOUR_ORG..log
ACCEPT CONTINUE CHAR FORMAT A1 PROMPT 'Press <ENTER> To Continue an EXECUTE ORG_IDs size(K) (CTRL-C to abort): '
-- @D:\cdus\cdusrun\org5cdus.sql  
PROMPT This Script (del5org.sql) Removes ALL (&YOUR_ORG) Org IDs Rows from Schema Owner &schema_user
show user
PROMPT Script Log File: D:\cdus\cdusrun\log\del_org_&YOUR_ORG..log
ACCEPT CONTINUE CHAR FORMAT A1 PROMPT 'Press <ENTER> To Continue an EXECUTE ..last chance.. (CTRL-C to abort): '

spool c:\del_org_&YOUR_ORG..log
set echo ON

PROMPT  Removing &YOUR_ORG's Rows from table TSMADDR ,  Please Wait...
 Delete From TSMADDR WHERE TSMADDR_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMALP ,  Please Wait...
 Delete From TSMALP WHERE TSMALP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMAMDA ,  Please Wait...
 Delete From TSMAMDA WHERE TSMMAD_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMCHKPT ,  Please Wait...
 Delete From TSMCHKPT WHERE LAST_PROCESSED_ORG1='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMCPORG ,  Please Wait...
 Delete From TSMCPORG WHERE TSMCPORG_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMCSNG ,  Please Wait...
 Delete From TSMCSNG WHERE TSMINTVL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMEADDR ,  Please Wait...
 Delete From TSMEADDR WHERE TSMEADDR_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMEISN ,  Please Wait...
 Delete From TSMEISN WHERE TSMEISN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSMEISN ,  Please Wait...
--  Delete From TSMEISN WHERE TSMEISN_ORG_ID='ZZZZZZZZ' ;
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMERS ,  Please Wait...
 Delete From TSMERS WHERE TSMERS_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMESTLC ,  Please Wait...
 Delete From TSMESTLC WHERE TSMALP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMFCLTY ,  Please Wait...
 Delete From TSMFCLTY WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMFILL ,  Please Wait...
 Delete From TSMFILL WHERE TSMINTVL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMFSA ,  Please Wait...
 Delete From TSMFSA WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMGLL ,  Please Wait...
 Delete From TSMGLL WHERE TSMALP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMGNTXT ,  Please Wait...
 Delete From TSMGNTXT WHERE TSMGNTXT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSMGNTXT ,  Please Wait...
--  Delete From TSMGNTXT WHERE TSMGNTXT_ORG_ID='ZZZZZZZZ' ;
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMHOLE ,  Please Wait...
 Delete From TSMHOLE WHERE TSMINTVL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMIGUA ,  Please Wait...
 Delete From TSMIGUA WHERE TSMIGUA_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMINTVL ,  Please Wait...
 Delete From TSMINTVL WHERE TSMINTVL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMLOG ,  Please Wait...
 Delete From TSMLOG WHERE TSMLOG_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMOCNLC ,  Please Wait...
 Delete From TSMOCNLC WHERE TSMALP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMOPNG ,  Please Wait...
 Delete From TSMOPNG WHERE TSMINTVL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

-- Delete From TSMORGAN ;
-- PROMPT  Removing &YOUR_ORG's Rows from table TSMORGAN ,  Please Wait...
--  Delete From TSMORGAN WHERE ORG_ID='ZZZZZZZZ' ;
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMPCOA ,  Please Wait...
 Delete From TSMPCOA WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPERSN ,  Please Wait...
 Delete From TSMPERSN WHERE TSMPERSN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPIPE ,  Please Wait...
 Delete From TSMPIPE WHERE TSMPIPE_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPMGRD ,  Please Wait...
 Delete From TSMPMGRD WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPMTCT ,  Please Wait...
 Delete From TSMPMTCT WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPPA ,  Please Wait...
 Delete From TSMPPA WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPPRA ,  Please Wait...
 Delete From TSMPPRA WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPRA ,  Please Wait...
 Delete From TSMPRA WHERE TSMPERSN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMPROGM ,  Please Wait...
 Delete From TSMPROGM WHERE TSMPROGM_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSMPROGM ,  Please Wait...
--  Delete From TSMPROGM WHERE TSMPROGM_ORG_ID='ZZZZZZZZ' ;                              
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMPROJ ,  Please Wait...
 Delete From TSMPROJ WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPRPRA ,  Please Wait...
 Delete From TSMPRPRA WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPSA ,  Please Wait...
 Delete From TSMPSA WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPSRA ,  Please Wait...
 Delete From TSMPSRA WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMPUMP ,  Please Wait...
 Delete From TSMPUMP WHERE TSMPUMP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMRFLBL ,  Please Wait...
 Delete From TSMRFLBL WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMSCTS ,  Please Wait...
 Delete From TSMSCTS WHERE TSMSOI_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMSOI ,  Please Wait...
 Delete From TSMSOI WHERE TSMSOI_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMSPRNG ,  Please Wait...
 Delete From TSMSPRNG WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMSTATN ,  Please Wait...
 Delete From TSMSTATN WHERE TSMSTATN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMTBINF ,  Please Wait...
 Delete From TSMTBINF WHERE ALTERNATE_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

-- Delete From TSMUOA WHERE TSMORGAN_IS_NUMBER=1 ;
PROMPT  Removing &YOUR_ORG's Rows from table TSMUOA ,  Please Wait...
 Delete From TSMUOA WHERE TSMORGAN_IS_NUMBER=
                     (select TSMORGAN_IS_NUMBER from tsmorgan where org_id='&YOUR_ORG') ;
 COMMIT;

-- Delete From TSMUSER WHERE TSMORGAN_IS_NUMBER=1 ;
PROMPT  Removing &YOUR_ORG's Rows from table TSMUSER ,  Please Wait...
-- Delete From TSMUSER ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMVSC ,  Please Wait...
 Delete From TSMVSC WHERE TSMVSC_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMWELL ,  Please Wait...
 Delete From TSMWELL WHERE TSMWELL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSMWLE ,  Please Wait...
 Delete From TSMWLE WHERE TSMWELL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRAAL ,  Please Wait...
 Delete From TSRAAL WHERE TSMALP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRADL ,  Please Wait...
 Delete From TSRADL WHERE TSRADL_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSRANLPR ,  Please Wait...
 Delete From TSRANLPR WHERE TSRANLPR_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSRANLPR ,  Please Wait...
--  Delete From TSRANLPR WHERE TSRANLPR_ORG_ID='ZZZZZZZZ' ;
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSRBRG ,  Please Wait...
 Delete From TSRBRG WHERE TSRBRG_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRBRGI ,  Please Wait...
 Delete From TSRBRGI WHERE TSRBRGI_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRCCGA ,  Please Wait...
 Delete From TSRCCGA WHERE TSRCCGA_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRCHDEF ,  Please Wait...
 Delete From TSRCHDEF WHERE TSRCHDEF_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRCHGRP ,  Please Wait...
 Delete From TSRCHGRP WHERE TSRCHGRP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSRCITN ,  Please Wait...
 Delete From TSRCITN WHERE TSRCITN_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSRCITN ,  Please Wait...
--  Delete From TSRCITN WHERE TSRCITN_ORG_ID='ZZZZZZZZ' ;
--  COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSRCLDES ,  Please Wait...
 Delete From TSRCLDES WHERE TSRRSULT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRCPA ,  Please Wait...
 Delete From TSRCPA WHERE TSMPROJ_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRDQL ,  Please Wait...
 Delete From TSRDQL WHERE TSRRSULT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSREOD ,  Please Wait...
 Delete From TSREOD WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFAFSA ,  Please Wait...
 Delete From TSRFAFSA WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFAPEA ,  Please Wait...
 Delete From TSRFAPEA WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFAPRA ,  Please Wait...
 Delete From TSRFAPRA WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFAQSA ,  Please Wait...
 Delete From TSRFAQSA WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFDACT ,  Please Wait...
 Delete From TSRFDACT WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFDSET ,  Please Wait...
 Delete From TSRFDSET WHERE TSRFDSET_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFLDPR ,  Please Wait...
 Delete From TSRFLDPR WHERE TSRFLDPR_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFQS ,  Please Wait...
 Delete From TSRFQS WHERE TSRFQS_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFQSDP ,  Please Wait...
 Delete From TSRFQSDP WHERE TSRFQSDP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRFQSPA ,  Please Wait...
 Delete From TSRFQSPA WHERE TSRFQS_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRGRCFG ,  Please Wait...
 Delete From TSRGRCFG WHERE TSRGRCFG_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRHCSC ,  Please Wait...
 Delete From TSRHCSC WHERE TSRHCSC_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRLAB ,  Please Wait...
 Delete From TSRLAB WHERE TSRLAB_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSRLSPP ,  Please Wait...
 Delete From TSRLSPP WHERE TSRLSPP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
-- PROMPT  Removing ZZZZZZZZ's Rows from table TSRLSPP ,  Please Wait...
-- Delete From TSRLSPP WHERE TSRLSPP_ORG_ID='ZZZZZZZZ' ;
-- COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSROAPA ,  Please Wait...
 Delete From TSROAPA WHERE TSMORGAN_IS_NUMBER=
                     (select TSMORGAN_IS_NUMBER from tsmorgan where org_id='&YOUR_ORG') ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSROAPCA ,  Please Wait...
 Delete From TSROAPCA WHERE TSMORGAN_IS_NUMBER=
                     (select TSMORGAN_IS_NUMBER from tsmorgan where org_id='&YOUR_ORG') ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSROLSPA ,  Please Wait...
 Delete From TSROLSPA WHERE TSMORGAN_IS_NUMBER=
                     (select TSMORGAN_IS_NUMBER from tsmorgan where org_id='&YOUR_ORG') ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSROPPRD ,  Please Wait...
 Delete From TSROPPRD WHERE TSROPPRD_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRPOPA ,  Please Wait...
 Delete From TSRPOPA WHERE TSROPPRD_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRRCI ,  Please Wait...
 Delete From TSRRCI WHERE TSRRSULT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRRLRA ,  Please Wait...
 Delete From TSRRLRA WHERE TSRRSULT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRRQCAF ,  Please Wait...
 Delete From TSRRQCAF WHERE TSRRQCAF_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRRSULT ,  Please Wait...
 Delete From TSRRSULT WHERE TSRRSULT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRSDP ,  Please Wait...
 Delete From TSRSDP WHERE TSRSDP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRSMPLE ,  Please Wait...
 Delete From TSRSMPLE WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRSTVST ,  Please Wait...
 Delete From TSRSTVST WHERE TSRSTVST_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRTNOD ,  Please Wait...
 Delete From TSRTNOD WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRTOD ,  Please Wait...
 Delete From TSRTOD WHERE TSRFDACT_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRTPA ,  Please Wait...
 Delete From TSRTPA WHERE TSRTRIP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRTRIP ,  Please Wait...
 Delete From TSRTRIP WHERE TSRTRIP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;
PROMPT  Removing &YOUR_ORG's Rows from table TSRTSA ,  Please Wait...
 Delete From TSRTSA WHERE TSRTRIP_ORG_ID='&YOUR_ORG'  ;
 COMMIT;

PROMPT  Removing &YOUR_ORG's Rows from table TSMORGAN ,  Please Wait...
 Delete From TSMORGAN WHERE ORG_ID='&YOUR_ORG'  ;

SPOOL OFF
-- SQL Plus Environment Variables
set echo off
set verify on
set feedback on
set termout on
set time off
set timing off
set heading on
set linesize 100
set pagesize 24
set serveroutput off
set echo on
-- File: DEL5ORG.SQL
-- @D:\cdus\cdusrun\del5org.sql  -- RE-RUN Script (if applicable)
-- @D:\cdus\cdusrun\   -- NEXT RUN Script
