-- ABS-130372
CREATE TABLE TEMPTABLE (CLIENTDELNOTELINEPOOL_ID          NUMBER NOT NULL,
                        TIMESTAMP                         DATE DEFAULT SYSDATE NOT NULL);
                        
INSERT INTO TEMPTABLE (CLIENTDELNOTELINEPOOL_ID, TIMESTAMP)
SELECT C.CLIENTDELNOTELINEPOOL_ID, CAST(C.TIMESTAMP AS DATE) TIMESTAMP FROM CLIENTDELNOTELINEPOOL C;

ALTER TABLE CLIENTDELNOTELINEPOOL DROP COLUMN TIMESTAMP;
ALTER TABLE CLIENTDELNOTELINEPOOL ADD (TIMESTAMP DATE DEFAULT SYSDATE NOT NULL);

UPDATE CLIENTDELNOTELINEPOOL C
SET C.TIMESTAMP = (SELECT CT.TIMESTAMP FROM TEMPTABLE CT WHERE CT.CLIENTDELNOTELINEPOOL_ID = C.CLIENTDELNOTELINEPOOL_ID);
COMMIT;

DROP TABLE TEMPTABLE;
