I am rewriting triggers in Oracle to SQL Server and I am running into some problems
In Oracle I can change the column SUBS1 new value to a substring of another columns value
:new.SUBS1:= SUBSTR
new.MR_ADAM_KEY,1,9)
In SQL I have tried something like this
Declare @as_temp varchar(20)
select @as_temp = Inserted.MR_ADAM_KEY from Inserted
Set Inserted.SUBS1 = SUBSTR(@as_temp,1,9)
I get an error near the period (.). I think it is due to incorrect syntax can someone point me to a place where I can find out how to do this? I have looked in BOL and I dont see refrences in setting a new value in an inserted table.
Thanks
In Oracle I can change the column SUBS1 new value to a substring of another columns value
:new.SUBS1:= SUBSTR
In SQL I have tried something like this
Declare @as_temp varchar(20)
select @as_temp = Inserted.MR_ADAM_KEY from Inserted
Set Inserted.SUBS1 = SUBSTR(@as_temp,1,9)
I get an error near the period (.). I think it is due to incorrect syntax can someone point me to a place where I can find out how to do this? I have looked in BOL and I dont see refrences in setting a new value in an inserted table.
Thanks