First Commit - Source Code from Reply
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
spool bonifica_HZ_MSISDN_071207.log
|
||||
|
||||
select count(*),stato from hz_gestione_richiesta where data_ricezione_richiesta <= sysdate-6
|
||||
and tipo_processo='R' and stato<>'7' and msisdn is null group by stato;
|
||||
|
||||
update hz_gestione_richiesta set msisdn = '1111111111' where data_ricezione_richiesta <= sysdate-6 and tipo_processo='R'
|
||||
and stato in (3,5) and msisdn is null;
|
||||
|
||||
select count(*),stato from hz_gestione_richiesta where data_ricezione_richiesta <= sysdate-6
|
||||
and tipo_processo='R' and stato<>'7' and msisdn is null group by stato;
|
||||
|
||||
commit;
|
||||
|
||||
spool off
|
||||
@@ -0,0 +1,56 @@
|
||||
declare
|
||||
cursor cur is
|
||||
select b.codice_richiesta_recipient || ';' || b.msisdn
|
||||
from mnp_gestione_richiesta_cess b
|
||||
where b.stato in(2,3)
|
||||
and b.tim_donor =1;
|
||||
|
||||
INDICE NUMBER;
|
||||
SECONDI NUMBER;
|
||||
file1_cess UTL_FILE.file_type;
|
||||
file1_ctr UTL_FILE.file_type;
|
||||
path varchar2(255);
|
||||
filename varchar2(255);
|
||||
filename_cess varchar2(255);
|
||||
filename_ctr varchar2(255);
|
||||
rs varchar2(255);
|
||||
|
||||
BEGIN
|
||||
INDICE:=0;
|
||||
SECONDI:=0;
|
||||
select directory_path into path from all_directories
|
||||
where directory_name='PATH_REPORT_CESS';
|
||||
filename := 'CESSAZIONI_'||to_char(sysdate,'yyyyMMddhh24mi')||TRIM(TO_CHAR(SECONDI,'09'));
|
||||
filename_cess := filename||'.txt';
|
||||
filename_ctr := filename||'.ctr';
|
||||
file1_cess := UTL_FILE.fopen ('PATH_REPORT_CESS',filename_cess, 'w');
|
||||
file1_ctr := UTL_FILE.fopen ('PATH_REPORT_CESS',filename_ctr, 'w');
|
||||
|
||||
|
||||
OPEN CUR;
|
||||
LOOP
|
||||
FETCH CUR INTO rs;
|
||||
EXIT WHEN CUR%NOTFOUND;
|
||||
|
||||
IF(MOD(INDICE,50000)=0 AND INDICE<>0) THEN
|
||||
UTL_FILE.fflush (file1_cess);
|
||||
UTL_FILE.fclose (file1_cess);
|
||||
UTL_FILE.fclose (file1_ctr);
|
||||
SECONDI:=SECONDI+1;
|
||||
filename := 'CESSAZIONI_'||to_char(sysdate,'yyyyMMddhh24mi')||TRIM(TO_CHAR(SECONDI,'09'));
|
||||
filename_cess := filename||'.txt';
|
||||
filename_ctr := filename||'.ctr';
|
||||
file1_cess := UTL_FILE.fopen ('PATH_REPORT_CESS',filename_cess, 'w');
|
||||
file1_ctr := UTL_FILE.fopen ('PATH_REPORT_CESS',filename_ctr, 'w');
|
||||
END IF;
|
||||
|
||||
UTL_FILE.put_line (file1_cess,rs);
|
||||
|
||||
INDICE:=INDICE+1;
|
||||
END LOOP;
|
||||
CLOSE CUR;
|
||||
UTL_FILE.fflush (file1_cess);
|
||||
UTL_FILE.fclose (file1_cess);
|
||||
UTL_FILE.fclose (file1_ctr);
|
||||
END;
|
||||
/
|
||||
@@ -0,0 +1,10 @@
|
||||
spool bonifica_pitagora_191107.log
|
||||
|
||||
insert into HZ_STORICO_RICHIESTA (id_richiesta, stato_da, stato_a, nome_file, i_o) values (1, 4, 3, 'bonifica', 1);
|
||||
insert into HZ_STORICO_RICHIESTA (id_richiesta, stato_da, stato_a, nome_file, i_o) values (2, 4, 3, 'bonifica', 1);
|
||||
update HZ_GESTIONE_RICHIESTA SET stato=3, causale_rifiuto = '' WHERE id_richiesta=1;
|
||||
update HZ_GESTIONE_RICHIESTA SET stato=3, causale_rifiuto = '' WHERE id_richiesta=2;
|
||||
|
||||
commit;
|
||||
|
||||
spool off
|
||||
45
dbcmnpsrc/FE/mnpapp/script/dbUpDate/bonifiche/dbc_SM1661.sql
Normal file
45
dbcmnpsrc/FE/mnpapp/script/dbUpDate/bonifiche/dbc_SM1661.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
spool /mnpapp/log/script/dbc_SM1661.log;
|
||||
|
||||
-- Select visualizzata nel log
|
||||
|
||||
SELECT c.id_richiesta, '10', c.numero_telefonico_olo,
|
||||
c.numero_duale, c.operatore, c.identificativo_richiesta_aom,
|
||||
c.tipo_richiesta, c.codice_fiscale_partita_iva, c.tecnologia,
|
||||
c.tipologia_utenza, c.data_validazione, c.iccd_serial_number, 'ACQUISITA',
|
||||
'Scartata per Waiting List', c.data_modifica_stato, c.note, c.tipo_processo,
|
||||
c.da_scodare, c.progettoadhoc, c.codice_gruppo, c.data_cut_over, c.codice_dealer
|
||||
FROM mnp_ccrm_notifica_out c,mnp_gestione_richiesta_rec r,mnp_storico_richiesta_rec s
|
||||
where r.id_richiesta=c.id_richiesta
|
||||
and c.da_scodare=1
|
||||
and c.stato = 'INVIATA ALTRO AOM'
|
||||
and s.id_richiesta=c.id_richiesta
|
||||
and s.stato_da=-1 and s.stato_a=3
|
||||
and s.nome_file is not null;
|
||||
|
||||
--Fine select
|
||||
|
||||
-- Inizio inserimento per bonifica
|
||||
insert into mnp_ccrm_notifica_out
|
||||
(ID_PROG,ID_RICHIESTA,CODICE_EVENTO,NUMERO_TELEFONICO_OLO,NUMERO_DUALE,OPERATORE,IDENTIFICATIVO_RICHIESTA_AOM,
|
||||
TIPO_RICHIESTA,CODICE_FISCALE_PARTITA_IVA,TECNOLOGIA,TIPOLOGIA_UTENZA,DATA_VALIDAZIONE,ICCD_SERIAL_NUMBER,STATO,
|
||||
CAUSALE,DATA_MODIFICA_STATO,NOTE,TIPO_PROCESSO,DA_SCODARE,UNIQUE_ID,PROGETTOADHOC,CODICE_GRUPPO,DATA_CUT_OVER,
|
||||
CODICE_DEALER)
|
||||
SELECT SEQ_MNP_CCRM_NOTIFICA_OUT.NEXTVAL, c.id_richiesta, '10', c.numero_telefonico_olo,
|
||||
c.numero_duale, c.operatore, c.identificativo_richiesta_aom,
|
||||
c.tipo_richiesta, c.codice_fiscale_partita_iva, c.tecnologia,
|
||||
c.tipologia_utenza, c.data_validazione, c.iccd_serial_number, 'ACQUISITA',
|
||||
'Scartata per Waiting List', c.data_modifica_stato, c.note, c.tipo_processo,
|
||||
c.da_scodare,'A' || SEQ_UNIQUE_ID.NEXTVAL, c.progettoadhoc,
|
||||
c.codice_gruppo, c.data_cut_over, c.codice_dealer
|
||||
FROM mnp_ccrm_notifica_out c,mnp_gestione_richiesta_rec r,mnp_storico_richiesta_rec s
|
||||
where r.id_richiesta=c.id_richiesta
|
||||
and c.da_scodare=1
|
||||
and c.stato = 'INVIATA ALTRO AOM'
|
||||
and s.id_richiesta=c.id_richiesta
|
||||
and s.stato_da=-1 and s.stato_a=3
|
||||
and s.nome_file is not null;
|
||||
|
||||
--Fine inserimento
|
||||
|
||||
spool off;
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
-- 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
|
||||
@@ -0,0 +1,20 @@
|
||||
-- Da eseguire come utente dbcgo
|
||||
spool /mnpapp/log/script/dbcgo_delete_11052006.log;
|
||||
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_8645189';
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9284923';
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9308862';
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9368998';
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9410164';
|
||||
select * from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9439484';
|
||||
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_8645189';
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9284923';
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9308862';
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9368998';
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9410164';
|
||||
delete from dbcgo_gestione_richiesta where id_richiesta = 'OPIV_9439484';
|
||||
|
||||
commit;
|
||||
|
||||
spool off
|
||||
Reference in New Issue
Block a user