-- Customer specific once-script NMMS22to23.sql.
--
-- (c) 2012 SG|facilitor bv
-- $Revision$
-- $Id$
--
-- Support: +31 53 4800700
SET ECHO ON
SPOOL xNMMS22to23.sql.lst
SET DEFINE OFF

-- 


ALTER TABLE nmms_monitoring ADD (eenheid VARCHAR2(1), tht_num NUMBER(10,5), overlappend VARCHAR2(100));

UPDATE nmms_monitoring
   SET tht_num = TO_NUMBER (SUBSTR (tht, 1, INSTR (tht, ' ') - 1)),
       eenheid = SUBSTR (tht, INSTR (tht, ' ') + 1, 1)
 WHERE tht IS NOT NULL;

ALTER TABLE nmms_monitoring DROP COLUMN tht;

ALTER TABLE nmms_monitoring RENAME COLUMN tht_num TO tht;

COMMIT;

BEGIN adm.systrackscriptid('$Id$'); END;
/


SPOOL OFF