git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/BD/FlyWay/trunk@72392 d1611594-4594-4d17-8e1d-87c2c4800839
master
leonardo 2017-08-07 20:42:32 +00:00
parent b49dd4c12d
commit 97a0d45b8c
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -01430);
begin
execute immediate 'ALTER TABLE RUTA_SECUENCIA ADD (KMORIGINAL NUMBER(7,2) DEFAULT 0 NOT NULL)';
exception when object_exists then null;
end;

View File

@ -0,0 +1,7 @@
declare
object_exists exception;
pragma exception_init (object_exists , -00001);
begin
execute immediate 'update ruta_secuencia r set r.kmoriginal = COALESCE((select t.cantkmreal - coalesce(t.cantkmentradasaida,0) from tramo t where t.tramo_id = r.tramo_id), 0)';
exception when object_exists then null;
end;