ALTER TABLE GERAL_PAG MODIFY CDOPEPERVISUBOL VARCHAR2(2000)
/
ALTER TABLE GERAL_PAG ADD IDUTVISUBOLOPELAC VARCHAR2(1) NULL
/

CREATE TABLE SOLICADIANTAMENTO( 
 DTREFERENCIA      DATE  NOT NULL,
 CDFORNECED        VARCHAR2(20) NOT NULL, 
 CDFILIAL          VARCHAR2(20) NOT NULL,
 VRVALOR           FLOAT(126) NULL,
 CDTIPODESPESAS    VARCHAR2(20) NOT NULL,
 VRLIMITE          FLOAT(126)         NOT NULL,
 CDCENTCUST        VARCHAR2(20) 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_SOLICADIANTAMENTO CHECK (IDATIVO IN ('S','N')),
        CONSTRAINT PK_CDTIPODESPESAS PRIMARY KEY (CDTIPODESPESAS)
)
/