45 lines
2.0 KiB
MySQL
45 lines
2.0 KiB
MySQL
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;
|
|
|