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
 Import/Export (DTS) and Replication (2000)
 moving data from a linked DB

Author  Topic 

ronji
Starting Member

8 Posts

Posted - 2004-08-16 : 20:35:41
Hi there,

I have a linked the table in SQL. Could you please give me an example of the code I would use in Query analyser to copy the data between db's

THe linked DB is called products_ncawebstore and the table is products
the destination DB is ncawebstore and the table is products.
regards Ron

This linked table was originally exported from the SQL DB, data was added keeping the same structure and now I would like to load it back over the DB

Kind regards Ron

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-16 : 20:46:35
INSERT INTO ncawebstore.dbo.products (ColumnList...)
SELECT ColumnList...
FROM LinkedServerName.products_ncawebstore.dbo.products

I would run the SELECT before actually doing the INSERT just in case it is wrong.

Tara
Go to Top of Page
   

- Advertisement -