Hello all,
I adapt a trigger. there is a part of code below:
SELECT INTO #ins FROM inserted
SELECT INTO #del FROM deleted
select @UserName = EMP_ModifiedBy, @empcode = emp_cd from #ins
if isnull(@UserName,'') = ''
select @UserName = EMP_ModifiedBy, @empcode = emp_cd from #del
when I run the trigger, the error message are:
Msg 207, Level 16, State 1, Procedure TR_OnStudy_OS, Line 38 [Batch Start Line 0]
Invalid column name 'EMP_ModifiedBy'.
Msg 207, Level 16, State 1, Procedure TR_OnStudy_OS, Line 38 [Batch Start Line 0]
Invalid column name 'emp_cd'.
Can you help me to fix the problem?
Thanks,
Kai