Quantcast
Channel: Latest Questions by aRookieBIdev
Viewing all articles
Browse latest Browse all 76

Return Identity insert from a remote stored proc execution

$
0
0
Hi , I have a storedprocedure usp_InsertNewEmployee in a remote server. I have set up linked server and a synonym for the stored procedure. I could execute the stored procedure as Exec usp_InsertNewEmployee @EmployeeName = 'John' But I need to execute the stored procedure as well as return the EmployeeId inserted to the new table which in an identity in that table . How can I use SCOPE_IDENTITY() to return this through open query. Kindly provide an example. Thanks NK

Viewing all articles
Browse latest Browse all 76

Trending Articles