troubleshooting Question

MSSQL - Inserting into a table in a linked server

Avatar of donhannam
donhannamFlag for New Zealand asked on
Microsoft SQL Server 2005
10 Comments1 Solution434 ViewsLast Modified:
I have set up a link to another database in MSSQL under linked servers (ODBC link called TEST).

I am looking to set up a stored procedure to insert data into a table in this database from data in my current MSSQL database.

I can read data from the database with:-
SELECT * FROM OPENQUERY(TEST, 'select * from Jobs') AS derivedtbl_1

I would like to run:-
Insert into TEST.Jobs (JobNumber, JobDesc) Values (123, 'Test Job')

I am not sure of the correct sytax for the link to the table in the linked server - TEST.Jobs does not work.

Appreciate any ideas.
ASKER CERTIFIED SOLUTION
prabhakaranbk

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros