SELECT INTO - different server

  • Hi,

    I know I can SELECT INTO another database.

    select * into database1.dbo.table1 from table1

    Can I do it across different servers with databases residing in each ??

    Thanks,

    matt

  • I think they have to be linked servers.

  • I don't believe it's possible to do Select Into across servers.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • You might have to use Linked Server, or use

    INSERT INTO OPENDATASOURCE('MSDASQL','DSN=Server;Uid=user;Pwd=password').DB.dbo.TABLE

    SELECT *

    FROM Table

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005
  • Instead of suign SELECT INTO why don't you try out BCP???

  • select into will work if it's a linked server and you use the four-part naming convention as follows: select * into servername.dbname.objectowner.tablename from sourcedbname..sourcetable

    -- You can't be late until you show up.

  • Thanks,

    I'll try some of these suggestions.

    Matt

  • If you have issues, post the exact sytax you're trying to run and you'll get plenty of help.

    -- You can't be late until you show up.

  • Does your query has joins accross the servers?

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply