aspose file tools*
The moose likes JDBC and the fly likes  transfer data from one DB to another DB ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark " transfer data from one DB to another DB ?" Watch " transfer data from one DB to another DB ?" New topic
Author

transfer data from one DB to another DB ?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1382
How to transfer data from one DB to another DB using JDBC?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
While it wouldn't be hard to write JDBC code that does a SELECT in one DB, and then an INSERT into the other DB, that's not the best approach. Just about all DBs have their own facilities for bulk-exporting and bulk-importing data; that area is called ETL (extract, transform, load) - check the documentation of the involved DBs for what they support.
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1382
I guess ETL is third party product like Informatica. It is not part of the DB. I want the option that's part of the DB or thru JDBC.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
No, ETL is a tool category; check its Wikipedia page if you're unsure about the term. There are certainly 3rd party products for this, but:
Just about all DBs have their own facilities for bulk-exporting and bulk-importing data ... check the documentation of the involved DBs for what they support.
april henry
Greenhorn

Joined: Jan 18, 2010
Posts: 9
Hi,
You can try to use the following code:


select 'insert into tb_08 select '+rtrim(id) +','''+name+'''' from tb_08
/*
insert into tb_08 select 1,'b'
insert into tb_08 select 2,'b2'
*/

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: transfer data from one DB to another DB ?