Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Copy data from table A in a DB to another DB

Author  Topic 

k9lover
Starting Member

2 Posts

Posted - 2004-05-21 : 14:12:29
Hi, folks.
Would anyone please help this SQL DB novice?
I am trying to copy "some rows" from table A in DB Server A to table B in another DB Server B.

This question should be quite simple and redundant in this SQL forum, and I tried to search this on this forum but with no luck.
Please help!!!!!!
Thanka a million in advance.
Chris,

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-05-21 : 14:16:51
You need to set up a linked server to the other server. If you search for linked server, you'll find all kinds of examples.

You then:

INSERT ServerB.database.dbo.tableB(col1,col2)
SELECT
ta.col1,
ta.col2
FROM
ServerA.database.dbo.tableA ta
WHERE
ta.col1 = 'blahblahblah'

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

k9lover
Starting Member

2 Posts

Posted - 2004-05-22 : 17:23:35
Thank you so much....
I really appreciate your BIG TIP!!!!!
Chris.
Go to Top of Page
   

- Advertisement -