Ver Mensaje Individual
  #3  
Antiguo 02-05-2017
LIGERO LIGERO is offline
Miembro
 
Registrado: jun 2007
Posts: 42
Reputación: 0
LIGERO Va por buen camino
Después de algunos intentos, este código no me da error, pero tampoco inserta la líneas del pedido.

Código SQL [-]
USE [G001]
GO
/****** Object:  Trigger [dbo].[mapeoweb]    Script Date: 05/02/2017 10:16:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER trigger [dbo].[mapeoweb]
ON [dbo].[INCIDENCIASLIN]
instead of INSERT
AS

declare @linea as int

BEGIN

  SET NOCOUNT ON

  set @linea = (SELECT idlinea FROM INSERTED)

  if EXISTS( SELECT comentario FROM INSERTED where comentario like '%MRW%')
  begin
    update incidenciaslin 
    set totalcliente = totalcliente / 1.21 
    where idlinea = @linea  
  end
    
END
Responder Con Cita