Morning all,
Was wondering if it is possible to return the last inserted identity value for a query which inserts into a table on a linked server.
I have a table on local\sqlexpress ...
CREATE TABLE [dbo].[JM](
[col1] [int] IDENTITY(1,1) NOT NULL
)
if i login to local and try the following
insert into [.\sqlexpress].adventureWorks.dbo.JM default values
select scope_identity()
It returns null. Is there another function i could use to get round this?