CREATE TABLE USR_ENTR_MERC (	
   CDEXFILIAL     		VARCHAR2(20), 
   IDENTRSAID     		VARCHAR2(1), 
   CDFILIAL       		VARCHAR2(4), 
   NRNOTAFISCAL   		VARCHAR2(20), 
   NRINSJURFORN   		VARCHAR2(20), 
   DTENTRADA      		DATE, 
   CDFILIRECE     		VARCHAR2(4), 
   CDTIPOOPER     		VARCHAR2(2), 
   DTEMISSAO      		DATE, 
   NRAUTOFORNE    	VARCHAR2(10), 
   LOG_ERRO       		VARCHAR2(3000), 
   DTIMPORTACAO   	DATE,  
   CDSERIE        		VARCHAR2(5), 
   CDMODDOCFISC   	VARCHAR2(2), 
   CDEXFORNECED   	VARCHAR2(30), 
   NRLANCTONF     		VARCHAR2(10), 
   NRLANCESTQ     		VARCHAR2(10), 
   NRLANCTOUSR    		VARCHAR2(20), 
   CDCODOC        		VARCHAR2(20), 
   NRORG                       	NUMBER 		DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
   IDATIVO                    	VARCHAR2(1)     	DEFAULT 'S' NOT NULL
      CONSTRAINT CKC_IDATIVO_USR_ENTR_MERC CHECK (IDATIVO IN ('S','N')),
   DTINCLUSAO             	DATE                   	NULL,
   DTULTATU                  	DATE                  	NULL,
   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'
)
/

CREATE TABLE USR_ITEM_ENTR_MERC (	
   CDEXFILIAL     		VARCHAR2(20), 
   CDFILIAL       		VARCHAR2(4), 
   NRNOTAFISCAL  		VARCHAR2(20), 
   CDFILIRECE     		VARCHAR2(4), 
   NRAUTOFORNE    	VARCHAR2(10), 
   DTIMPORTACAO   	DATE, 
   VRQUANTIDADE   	FLOAT(126), 
   VRUNITARIO     		FLOAT(126), 
   CDPRODINTE     		VARCHAR2(20), 
   DTEMISSAO      		DATE, 
   DTENTRADA      		DATE, 
   NRINSJURFORN   		VARCHAR2(20), 
   CDSERIE       		VARCHAR2(5), 
   DSDESCRICAO    		VARCHAR2(48), 
   IDENTRSAID     		VARCHAR2(1), 
   NRLANCTOUSR    		VARCHAR2(20), 
   NRORG                       	NUMBER 		DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
   IDATIVO                    	VARCHAR2(1)     	DEFAULT 'S' NOT NULL
      CONSTRAINT CKC_IDATIVO_USR_IT_ENTR_MERC CHECK (IDATIVO IN ('S','N')),
   DTINCLUSAO             	DATE                   	NULL,
   DTULTATU                  	DATE                  	NULL,
   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'
) 