Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Other SQL Server Topics / September 2007

Tip: Looking for answers? Try searching our database.

Select Into across Linked Servers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jennifer - 27 Sep 2007 16:38 GMT
Hi.  I'm trying to copy from one table to another across 2 different
servers with the following:

select *
into #Tmp_Hdr
from parsaleshdr
where businessday = '9/20/07'

select *
into [pdsqla01\pdsqla01].impact_exec.dbo.parsaleshdr
from #Tmp_Hdr

This gives me an error:
The object name 'pdsqla01\pdsqla01.impact_exec.dbo.' contains more
than the maximum number of prefixes. The maximum is 2.

Not really sure how to get around it.  I was trying to use OpenQuery,
but that's really for selecting from, not into. How can I get around
this?

Thanks,
Jennifer
Erland Sommarskog - 28 Sep 2007 22:43 GMT
> Hi.  I'm trying to copy from one table to another across 2 different
> servers with the following:
[quoted text clipped - 15 lines]
> but that's really for selecting from, not into. How can I get around
> this?

You need to create the table on the remote server in advance.

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.