CREATE TABLE UPDATERSERVICOCX (
	CDFILIAL      	  VARCHAR2(4) 	  NOT NULL,
	CDCAIXA       	  VARCHAR2(4) 	  NOT NULL,
	MONITORAMENTO 	  VARCHAR2(4000)  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_UPDATERSERVICOCX  CHECK (IDATIVO IN ('S','N'))
)
/
CREATE INDEX VND00872_FK ON UPDATERSERVICOCX (CDFILIAL)
/
ALTER TABLE UPDATERSERVICOCX ADD CONSTRAINT FKVND00872UPDATERSERVICOCX
	FOREIGN KEY (CDFILIAL) REFERENCES FILIAL (CDFILIAL)
/