Getting Null value Of variable in sql server
- by Neo
Strange situation
In a trigger i assign a column value to variable but gives exception while inserting into other table using that variable.
e.g
select @srNO=A.SrNo from A where id=123;
insert into B (SRNO) values (@srNo) // here it gives null
I run above select query in query pane it works fine but in trigger it gives me null
any suggestions