Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get scope_identity for a remote insert
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01322722
Message ID:
01322785
Views:
6
The SCOPE_IDENTITY() you're printing is for the local server. You may try to use a stored procedure on the Remote server to return the Identity value. Didn't try it myself.

>can you tell me why my Scope_identity for a remote insert is a null?
>how can I fix this?
>
>
>insert into RemoteServer.MyDB.dbo.Customers(....) values(....)
>print 'SCOPE_IDENTITY()=' + convert(char,isnull(SCOPE_IDENTITY(),0))
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform