-- Da eseguire come utente mnp

spool /mnpapp/log/script/dbc_delete_11052006.log;

-- Richiesta nello stato 16 OPIV_9439484
select * from mnp_storico_richiesta where id_richiesta = 'OPIV_9439484';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9439484';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9439484';
select * from mnp_crm_validazione_in where id_richiesta = 'OPIV_9439484';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9439484';
select * from mnp_asp_crm_cessazione_out where id_richiesta = 'OPIV_9439484';
select * from mnp_circe_out where id_richiesta = 'OPIV_9439484';
select * from mnp_mss_cessazione_in where id_richiesta = 'OPIV_9439484';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9439484';
select * from mnp_sms_l1 where id_richiesta = 'OPIV_9439484';
select * from mnp_sms_l1v where id_richiesta = 'OPIV_9439484';
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_9439484';

delete from mnp_storico_richiesta where id_richiesta = 'OPIV_9439484';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9439484';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9439484';
delete from mnp_crm_validazione_in where id_richiesta = 'OPIV_9439484';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9439484';
delete from mnp_asp_crm_cessazione_out where id_richiesta = 'OPIV_9439484';
delete from mnp_circe_out where id_richiesta = 'OPIV_9439484';
delete from mnp_mss_cessazione_in where id_richiesta = 'OPIV_9439484';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9439484';
delete from mnp_sms_l1 where id_richiesta = 'OPIV_9439484';
delete from mnp_sms_l1v where id_richiesta = 'OPIV_9439484';
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_9439484';

-- Richieste nello stato 4
-- OPIV_8645189 
select * from mnp_storico_richiesta where id_richiesta = 'OPIV_8645189';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_8645189';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_8645189';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_8645189';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_8645189' ;
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_8645189';

delete from mnp_storico_richiesta where id_richiesta = 'OPIV_8645189';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_8645189';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_8645189';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_8645189';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_8645189' ;
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_8645189';

-- OPIV_9284923 

select * from mnp_storico_richiesta where id_richiesta = 'OPIV_9284923';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9284923';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9284923';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9284923';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9284923';
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_9284923';

delete from mnp_storico_richiesta where id_richiesta = 'OPIV_9284923';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9284923';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9284923';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9284923';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9284923';
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_9284923';



-- OPIV_9308862

select * from mnp_storico_richiesta where id_richiesta = 'OPIV_9308862';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9308862';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9308862';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9308862';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9308862';
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_9308862';
 
delete from mnp_storico_richiesta where id_richiesta = 'OPIV_9308862';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9308862';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9308862';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9308862';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9308862';
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_9308862';


-- OPIV_9368998 
select * from mnp_storico_richiesta where id_richiesta = 'OPIV_9368998';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9368998';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9368998';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9368998';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9368998';
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_9368998';

delete from mnp_storico_richiesta where id_richiesta = 'OPIV_9368998';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9368998';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9368998';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9368998';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9368998';
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_9368998';

-- OPIV_9410164
select * from mnp_storico_richiesta where id_richiesta = 'OPIV_9410164';
select * from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9410164';
select * from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9410164';
select * from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9410164';
select * from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9410164';
select * from mnp_gestione_richiesta where id_richiesta = 'OPIV_9410164';
 
delete from mnp_storico_richiesta where id_richiesta = 'OPIV_9410164';
delete from mnp_xml_richiesta_in where id_richiesta = 'OPIV_9410164';
delete from mnp_xml_richiesta_out where id_richiesta = 'OPIV_9410164';
delete from mnp_ccrm_notifica_out where id_richiesta = 'OPIV_9410164';
delete from mnp_dbcgo_notifica_donor_out where id_richiesta = 'OPIV_9410164';
delete from mnp_gestione_richiesta where id_richiesta = 'OPIV_9410164';

commit;

spool off
