ALTER TABLE FCT_RELACESCOPOMODELO ADD (
  NRSEQMODDOCFCT NUMBER(10) DEFAULT NULL NULL, 
  CDFILIAL VARCHAR2(4) DEFAULT NULL NULL
)
/
ALTER TABLE FCT_RELACESCOPOPROPOSTA ADD (
  NRSEQMODDOCFCT NUMBER(10) DEFAULT NULL NULL, 
  CDFILIAL VARCHAR2(4) DEFAULT NULL NULL
)
/
ALTER TABLE FCT_RELACESCOPOMODELO ADD CONSTRAINT FK_FCT_MODELODOC_RELESCOMOD FOREIGN KEY (NRSEQMODDOCFCT, NRORG) REFERENCES FCT_MODELODOC (NRSEQMODDOCFCT, NRORG)
/
ALTER TABLE FCT_RELACESCOPOMODELO ADD CONSTRAINT FK_FILIAL_FCT_RELESCOMODELO FOREIGN KEY (CDFILIAL, NRORG) REFERENCES FILIAL (CDFILIAL, NRORG)
/
ALTER TABLE FCT_RELACESCOPOPROPOSTA ADD CONSTRAINT FK_FCT_MODELODOC_RELESCOPRO FOREIGN KEY (NRSEQMODDOCFCT, NRORG) REFERENCES FCT_MODELODOC (NRSEQMODDOCFCT, NRORG)
/
ALTER TABLE FCT_RELACESCOPOPROPOSTA ADD CONSTRAINT FK_FILIAL_FCT_RELESCOPROPOSTA FOREIGN KEY (CDFILIAL, NRORG) REFERENCES FILIAL (CDFILIAL, NRORG)
/
CREATE TABLE FCT_TMP_DOCUMENTOORCA (
  NRSEQORCAMENTO NUMBER(10) DEFAULT NULL NULL, 
  NRTIPOORCAMENTO NUMBER(10) DEFAULT NULL NULL, 
  TXDOCUMENTO CLOB DEFAULT NULL NULL, 
  NRORG VARCHAR2(255) DEFAULT NULL NULL
)