CREATE INDEX FKINTG00333VALAFNF ON INTG_ITEMPRODUTO (NRAUTOFORN, NRORG)
/

ALTER TABLE PRODSUPPLY ADD CDFILCOT VARCHAR2(4)
/

ALTER TABLE PRODSUPPLY ADD CDREGIAO VARCHAR2(3)
/

ALTER TABLE PRODSUPPLY ADD CDMARCA VARCHAR2(5)
/

CREATE TABLE INTGORCAGOP( 
  NRINTGORCAGOP 		NUMBER NOT NULL,
  CDFILIL      			VARCHAR2(4) NOT NULL,
  NRANO        			DATE NOT NULL,
  CDITMORCA    			NUMBER,
  CDDESPDIV    			NUMBER,
  CDARVPROD    			VARCHAR2(20),
  VRORCAJAN     		FLOAT,
  VRORCAFEV     		FLOAT,
  VRORCAMAR     		FLOAT,
  VRORCAABR     		FLOAT,
  VRORCAMAI     		FLOAT,
  VRORCAJUN     		FLOAT,
  VRORCAJUL     		FLOAT,
  VRORCAAGO     		FLOAT,
  VRORCASET     		FLOAT,
  VRORCAOUT     		FLOAT,
  VRORCANOV     		FLOAT,
  VRORCADEZ     		FLOAT,
  IDORCAIMP    			VARCHAR2(1) DEFAULT 'N' NOT NULL CONSTRAINT CKC_IDORCAIMP_INTGORCAGOP CHECK (IDORCAIMP IN ('S','N')),
  NRORG         		NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
  IDATIVO       		VARCHAR2(1) 	DEFAULT 'S' NOT NULL CONSTRAINT CKC_IDATIVO_NOTIFICSUPPLY 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',
  CONSTRAINT PK_INTGORCAGOP PRIMARY KEY (NRINTGORCAGOP)
)
/