declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate
	'CREATE TABLE DADOS_ESTORNO_TROCOSIMPLES (
		DADOSESTORNOTROCOSIMPLES_ID NUMBER(7) NOT NULL,
		CPF VARCHAR2(15),
        ID_TRANSACAO VARCHAR2(100),
		DATATRANSACAO DATE,
        ACTIVO NUMBER(1),
		NUMFOLIOSISTEMA VARCHAR2(36),
        VALORTOTAL NUMBER(11,2),
        VALORESTORNADO NUMBER(11,2),
        NUMOPERACION VARCHAR2(36),
        ORIGEN_ID NUMBER(7),
        DESTINO_ID NUMBER(7),
        CORRIDA_ID NUMBER(22,0),
        FECCORRIDA DATE,
        EMPRESA_ID NUMBER(22,0),
        PUNTOVENTA_ID NUMBER(22,0),
        FECMODIF DATE,
        USUARIO_ID NUMBER(7),
        PRIMARY KEY (DADOSESTORNOTROCOSIMPLES_ID),
        FOREIGN KEY (DESTINO_ID) REFERENCES PARADA (PARADA_ID) ENABLE, 
        FOREIGN KEY (ORIGEN_ID) REFERENCES PARADA (PARADA_ID) ENABLE
	)';
  exception when object_exists then null;
end;
/
declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate 
	'CREATE SEQUENCE DADOS_ESTORNO_TS_SEQ INCREMENT BY 1 START WITH 1 NOCACHE ORDER NOCYCLE';	
  exception when object_exists then null;
end;
