Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferring data between two databases 1

Status
Not open for further replies.

deb18

Programmer
May 19, 2003
40
US
I am trying to put the results from a query on one database server into a table on a different server. I have put the results of the query into a dataset. Is there a simple way to "export" the contents of the entire query into a SQL table in the second database without using a dataset as a conduit? Is there a better way to accomplish this task? If I do, in fact, need to use a dataset, once I have the dataset populated, what's the best way to dump that data into a fresh table on DB server #2?

Thanks,
Deb
 
Are you using sql-server?

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
then you should use sqlserver to do the transfer its a lot easier one simple insert statement should do.

something like

insert servername.databasename.username.tablename (field1,field2) values (select field1,field2 from servername2.databasename.username.tablename)

I'm not sure about the syntax. Go to the sql-Server forum they will help you.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Or define a DTS package to do this.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
I had originally tried to do this within sqlserver but it didn't work but I think that this was due to some connectivity issues. I think that it's OK now. Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top