--execute as DBCGO

---INSERT DBCGO_LOV PER REPORT
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TDD','MNP TIM DONOR DATI');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TDDR','MNP TIM DONOR DATI RIFIUTI');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TRD','MNP TIM RECIPIENT DATI');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TRDR','MNP TIM RECIPIENT DATI RIFIUTI');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TTPD','MNP TIM TERZA PARTE DATI');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TCDI','MNP TIM CESSAZIONE IN OUT DATI IN');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','TCDO','MNP TIM CESSAZIONE IN OUT DATI OUT');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','MI','MOBILITA INTEROPERATORE');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','CR','RECIPIENT CANALE');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT','DD','DELIBERA DONATING');

INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12308','12308');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12309','12309');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12310','12310');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12311','12311');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12312','12312');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','12313','12313');
INSERT INTO DBCGO_LOV (LOV_ID, LOV_NAME, NAME, DESCR) VALUES ( SEQ_LOV.NEXTVAL,'REPORT_ID','ND','ND');

--- INSERT DBCGO LOV PER NOVERCA
INSERT INTO DBCGO_LOV(LOV_ID, LOV_NAME, NAME, DESCR,ORDER_BY) VALUES (SEQ_LOV.nextval, 'OPERATORE_VIRTUALE', 'NOVE', 'Noverca', 4);

---INSERT DBCGO LOV REF PER REPORT
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TDD';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TDDR';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TRD';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TRDR';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TTPD';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TCDI';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='TCDO';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='MI';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='CR';
insert into DBCGO_LOV_REF(lov_id, lov_id_ref) select lov_id,lov_id from DBCGO_LOV where lov_name='REPORT' and name='DD';



update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12308') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='MI') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12309') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TCDI') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12309') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TCDO') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12310') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TDD') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12310') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TDDR') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12311') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TRD') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12311') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TRDR') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12312') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='TTPD') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='12313') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='CR') ;
update DBCGO_LOV_REF set lov_id_ref = (select lov_id from DBCGO_LOV where lov_name='REPORT_ID'	and name='ND') where lov_id=(select lov_id from DBCGO_LOV where lov_name='REPORT'	and name='DD') ;

COMMIT;