-- EXEC AS USER DWH         
-- Add field CSV4 to View DWH.MNP_REPORT_AGCOM_VIEW
-- to cover further 4k segment of CLOB field CSV in table DWH.MNP_REPORT_AGCOM
-- MNP_SM_2350 Subject: Anomalia su report AGCOM
-- From: Renzulli Giuliano On: venerdì 24 novembre 2017 12:08

CREATE OR REPLACE FORCE VIEW MNP_REPORT_AGCOM_VIEW (
   ANNO,
   MESE,
   TIPO,
   DATA_CREAZIONE,
   CSV1,
   CSV2,
   CSV3,
   CSV4
) AS (
	SELECT   ANNO,
             MESE,
             TIPO,
             DATA_CREAZIONE,
             DBMS_LOB.SUBSTR (CSV, 4000,     1) CSV1,
             DBMS_LOB.SUBSTR (CSV, 4000,  4001) CSV2,
             DBMS_LOB.SUBSTR (CSV, 4000,  8001) CSV3,
             DBMS_LOB.SUBSTR (CSV, 4000, 12001) CSV4
      FROM   MNP_REPORT_AGCOM
);

COMMENT ON COLUMN MNP_REPORT_AGCOM_VIEW.CSV4 IS 'Added 201712 MNP_SM_2349 - extend coverage of overgrown DWH.MNP_REPORT_AGCOM.CSV'
/
