Hi all,
I am inserting into a remote table and need to get the identity value that was last created i.e.
insert into [RemoteServer].[RemoteDatabase].dbo.[DB](num)
values(1)
declare @id int
set @id = @@identity
select @id
This is returning NULL for the identity value but works fine if I run it on the server locally.
Does anyone know how to pick up the identity value?
Thanks,
Paul
I am inserting into a remote table and need to get the identity value that was last created i.e.
insert into [RemoteServer].[RemoteDatabase].dbo.[DB](num)
values(1)
declare @id int
set @id = @@identity
select @id
This is returning NULL for the identity value but works fine if I run it on the server locally.
Does anyone know how to pick up the identity value?
Thanks,
Paul