declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate 'CREATE TABLE TARIFA_CONVENIO_TRANSP (
					    "TARIFACONVENIO_ID" NUMBER(7,0) PRIMARY KEY,
					    "CONVENIOTRANSPORTADORA_ID" NUMBER(7,0),
					    "ORIGEN_ID" NUMBER(7,0),
					    "DESTINO_ID" NUMBER(7,0),
					    "TARIFA" NUMBER(10, 2),
					    "USUARIO_ID" NUMBER(7,0),
					    "ACTIVO" NUMBER(1,0),
					    "FECMODIF" DATE,					    
					    CONSTRAINT "fk_grupo_contrato" FOREIGN KEY ("CONVENIOTRANSPORTADORA_ID") REFERENCES "CONVENIO_TRANSPORTADORA"("CONVENIOTRANSPORTADORA_ID"),
					    CONSTRAINT "fk_parada_origen" FOREIGN KEY ("ORIGEN_ID") REFERENCES "PARADA"("PARADA_ID"),
					    CONSTRAINT "fk_parada_destino" FOREIGN KEY ("DESTINO_ID") REFERENCES "PARADA"("PARADA_ID")
					)';
  exception when object_exists then null;
end;
/
declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate 'CREATE SEQUENCE "TARIFA_CONVENIO_TRANSP_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';
  exception when object_exists then null;
end;