Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on insert statement between two table by linking server mentioned below
insert into [servername].[dbname]. [tablename or viewname]
select * from [other server].[other dbname].[tablename]

when I try to accomplish this it gave me error : Verify if correct server is specified or execute sp-addlinkserver.
since there is restriction on linking server I need different query to execute insert stsatement.

any idea wel come.

Vijay
Posted

The proper full name ins SQL contains also schema name:
[server].[db].[schema].[table]
If you want to use default schema write it like this:
[server].[db]..[table]
(Note the double-dot!)
 
Share this answer
 
You can use the OpenRowSet function:

http://msdn.microsoft.com/en-us/library/ms190312.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900