Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/05/2006, 16:29
Avatar de Mithrandir
Mithrandir
Colaborador
 
Fecha de Ingreso: abril-2003
Mensajes: 12.106
Antigüedad: 21 años, 10 meses
Puntos: 25
Creo que algo como esto ayudará:
Código:
.....
DECLARE @mitotal INT OUTPUT
BEGIN     
           	Execute SP_Det_Factura @ID_Nun_Fact, @mitotal OUTPUT	
             FETCH NEXT FROM C1 
	     into  @ ID_Num_Fact
 END
.....
Código:
CREATE PROCEDURE SP_Det_Factura
	@ID_Nun_Fact,
	@total INT OUTPUT
begin 
Select @total= sum(Det_Factura_valor)
From Det_Factura
Where ID_Num_Fact = @ID_Num_Factura
End
__________________
"El hombre, en su orgullo, creó a Dios a su imagen y semejanza."
Friedrich Nietzsche