Can someone tell me why the following does not work? I do not get any errors but the insert never takes place. This trigger is done on a view. Thanks in advance for the help.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [dbo].[fs_entertomailshop] ON [dbo].[fs_vw_entertomailshop] instead of insert AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @refnum char(10);
declare @projname char(100);
declare @u1comments char(2000)
set @refnum = (select jobnumber from inserted)
set @projname = (select jobdescription from inserted)
set @u1comments = (select ppinstructions from inserted)
--insert into mailshop2ksql.tblorders (refnum,projname,u1comments)
-- values(@refnum,@projname,@u1comments)
insert into mailshop2ksql..tblorders (refnum,projname,u1comments)
values('99999s','yryryry','gdggdg')
END
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER TRIGGER [dbo].[fs_entertomailshop] ON [dbo].[fs_vw_entertomailshop] instead of insert AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
declare @refnum char(10);
declare @projname char(100);
declare @u1comments char(2000)
set @refnum = (select jobnumber from inserted)
set @projname = (select jobdescription from inserted)
set @u1comments = (select ppinstructions from inserted)
--insert into mailshop2ksql.tblorders (refnum,projname,u1comments)
-- values(@refnum,@projname,@u1comments)
insert into mailshop2ksql..tblorders (refnum,projname,u1comments)
values('99999s','yryryry','gdggdg')
END