CREATE TABLE XMLESTOQUE
(
    CDFILIAL         	VARCHAR2(4)      NOT NULL,
    DTINIPERIODO     	DATE             NOT NULL,    
    IDENVIOXMLESTQ   	VARCHAR2(1)      NULL,
    DSRECIBOXMLESTQ  	VARCHAR2(500)    NULL,
    NRORG 	       	NUMBER DEFAULT 	 SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO		VARCHAR2(1)	DEFAULT 'S' 	NOT NULL
		CONSTRAINT CKC_IDATIVO_XMLESTOQUE CHECK (IDATIVO IN ('S', 'N')),          
    DTINCLUSAO      	DATE           	NULL,
    DTULTATU        	DATE           	NULL,
    NRORGINCLUSAO   	NUMBER         	DEFAULT 1	NULL,
    CDOPERINCLUSAO  	VARCHAR2(12)   	DEFAULT '1'	NULL,
    NRORGULTATU     	NUMBER         	DEFAULT 1	NULL,
    CDOPERULTATU    	VARCHAR2(12)   	DEFAULT '1'	NULL,    
		CONSTRAINT PK_XMLESTOQUE PRIMARY KEY (CDFILIAL,DTINIPERIODO)
)
/


ALTER TABLE PARAVEND ADD WSXMLFISCO VARCHAR2(250) DEFAULT 'http://webservices.sef.sc.gov.br/wsDfeSiv/Recepcao.asmx' NULL
/


ALTER TABLE REDUCAOZ ADD IDENVIOXMLREDZ VARCHAR2(1) DEFAULT 'N' NULL
/

ALTER TABLE REDUCAOZ ADD DSRECIBOXMLREDZ VARCHAR2(500) NULL
/