Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How do I perform a 'Select Into" on a remote server

Posted on 2009-05-04
4
Medium Priority
?
395 Views
Last Modified: 2012-08-13
I have a remote db within my local studio; configured the linked server...
I can perfrom a select on the remote db by:
select * from [192.xxx.xxx.xxx].testdb.dbo.table

What I would like to do is insert data from a local table into the remote table:

select *
into [192.xxx.xxx.xxx].testdb.dbo.table
from table
0
Comment
Question by:Glen_D
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:Glen_D
ID: 24299733
forgot to add but here is my error with abover insert code:

contains more than the maximum number of prefixes. The maximum is 2.
0
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 1000 total points
ID: 24299747
Hello Glen_D,

The new table created with the INTO clause does not support 4 part names. it allows only 2 part names, so you would need to create the table and then use INSERT..SELECT to populate it.

Regards,

Aneesh
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 1000 total points
ID: 24299749
you cannot CREATE a table on a remote server.
but you can insert:
insert into [192.xxx.xxx.xxx].testdb.dbo.table
select *
from table

Open in new window

0
 

Author Closing Comment

by:Glen_D
ID: 31577784
Thanks Gentlemen...really helped out here.  Glen
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question