Ver Mensaje Individual
  #3  
Antiguo 30-09-2004
jncrls jncrls is offline
Registrado
 
Registrado: may 2003
Ubicación: Venezuela
Posts: 6
Reputación: 0
jncrls Va por buen camino
También lo puedes hacer con un stored procedure, según dicen se ejecutan más rápido y en este caso haces una sola pasada a la tabla.


create procedure XXX returns (
IMP_A double precision,
IMP_B double precision)
as
declare variable Tipo varchar(1);
begin
for select TIMPORTE, IMPORTE from Tabla into :Tipo, :IMP_A
do begin
if (Tipo = 'B') then begin
IMP_B = IMP_A;
IMP_A = null;
end
else
IMP_B = null;
end
end
Responder Con Cita