CREATE TABLE REPORTCONFIG
( 
    NRREPORTCONFIG NUMBER       NOT NULL,
    ROUTINE        VARCHAR2(20) NOT NULL,
    REPORTCODE     VARCHAR2(50) NOT NULL,
    REPORTNAME     VARCHAR2(100) NOT 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_REPORTCONFIG CHECK (IDATIVO IN ('S','N')),
        CONSTRAINT PK_REPORTCONFIG PRIMARY KEY (NRREPORTCONFIG)
)
/
CREATE SEQUENCE SEQ_REPORTCONFIG INCREMENT BY 1 MINVALUE 1
/