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

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
Glen_DAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
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
 
Glen_DAuthor Commented:
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
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
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
 
Glen_DAuthor Commented:
Thanks Gentlemen...really helped out here.  Glen
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.