Ver Mensaje Individual
  #23 (permalink)  
Antiguo 18/08/2011, 15:49
Avatar de galletica12
galletica12
 
Fecha de Ingreso: mayo-2011
Ubicación: Tekax, Yucatán
Mensajes: 213
Antigüedad: 13 años
Puntos: 8
Respuesta: Error en mi procedimiento

si le agrege otro el @IdProducto por que corrio el programa pero no me desconto la cantidad asi que le agrege otro parametro quedo asi:
Código:
Alter Procedure [dbo].[pa_Descontar]
@IdProducto int,
@Cantidad Numeric

AS

Select Cantidad - @Cantidad as Vendido from Producto
where IdProducto = @IdProducto
intente usar este pero me mando el mismo error.

Código:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[DescontarElProducto]
(
    @Cantidad Numeric,
    @cod int
)
AS
    SET NOCOUNT OFF;
UPDATE       Producto
SET                Cantidad = Cantidad - @Cantidad
WHERE        (IdProducto = @cod)
__________________
Info y Servicios http://www.pc-land.webege.com/ Saludos...:adios:.