Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Trigger on MSSQL 2000

Author  Topic 

Feza
Starting Member

1 Post

Posted - 2014-09-07 : 09:39:09
hi all,

I am not programmer but I am managing integration process between IS systems. I have a problem inserted one field value.
Stored value must be 1 or 2 on MS SQL database but rarely integration process received 10 or 20 value for this field which transferred from DB2.
Service provider didn't find any reason why this value populated so I think a trigger can change this value from 10/20 to 1/2 during Insert.

I tried to write a trigger for change 10 to 1 but I got syntax error on my first trigger :)

any help will be big assist to me
thanks

Feza
-----------
CREATE TRIGGER [T1020TO12] ON [dbo].[mnfe_ft]
FOR INSERT
as
SET NOCOUNT ON
SET XACT_ABORT ON

Begin
UPDATE mnfe_num_serie=1
from inserted
where mnfe_num_serie=10
end
go
   

- Advertisement -