I need to copy all of the rows in a table from a database on one server, to another existing table of the same name in a different database on a different server. I'm trying to use a SELECT INTO statement. Any idea how to do this?
I've tried
SELECT * INTO DestinationServer.dbo.DestinationDB.DestinationTable
FROM SourceTable AS SourceTable_1
But this doesn't work, saying there are too many prefixes.
bhbase99
0 Points
5 Posts
how to copy one table from one database to another on different servers?
Jul 31, 2007 08:57 PM|LINK
Hello.
I need to copy all of the rows in a table from a database on one server, to another existing table of the same name in a different database on a different server. I'm trying to use a SELECT INTO statement. Any idea how to do this?
I've tried
SELECT * INTO DestinationServer.dbo.DestinationDB.DestinationTable
FROM SourceTable AS SourceTable_1
But this doesn't work, saying there are too many prefixes.
Any idea how to do this?