ALTER TABLE PARAMAN ADD IDTRASREQUEST VARCHAR2(1)
/

CREATE TABLE RELACOPRETI
(
    CDFILIAL            VARCHAR2(4)     NOT NULL,
    NRSEQRELAC          VARCHAR2(10)    NOT NULL,
    DTRETIRADA          DATE            NOT NULL,
    NRITRELAC      		VARCHAR2(10)    NOT NULL, 
    NRORDPROD           VARCHAR2(10)    NULL,
    NRSUBORDPROD        VARCHAR2(1)     NULL,
    NRRETEST            VARCHAR2(10)    NULL,
	NRORG             	NUMBER 	      	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO           	VARCHAR2(1)     DEFAULT 'S'										NOT NULL,
    DTINCLUSAO        	DATE            DEFAULT SYSDATE,
    DTULTATU          	DATE            DEFAULT SYSDATE,
    NRORGINCLUSAO     	NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERINCLUSAO    	VARCHAR2(12)    DEFAULT '1' 									NULL,
    NRORGULTATU       	NUMBER          DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')		NULL,
    CDOPERULTATU      	VARCHAR2(12)    DEFAULT '1',
		CONSTRAINT CKC_IDATIVO_RELACOPRETI CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT PK_RELACOPRETI PRIMARY KEY (CDFILIAL, NRSEQRELAC, NRITRELAC)
)
/ 

ALTER TABLE ITEMRETIEST ADD NRREQUESTO VARCHAR2(10)
/