Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting data from linked server to SQL Server

Status
Not open for further replies.

majorbroncosfan

Programmer
Joined
Feb 23, 2001
Messages
121
Location
US
How can I insert data from a linked server into a SQL Server?
 
insert into localtablename
select * from linkedserv.dbname.ownername.tablename

where linkedserv is the linked server name and dbname is the database name (as in the case of MS SQL server) or can be null as follows:
insert into localtablename
select * from linkedserv..ownername.tablename
as the case in an oracle or DB2 db.

ownername is the table owner ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top