Thread: Data Migration
View Single Post

   
  #1 (permalink)  
Old 04-16-2008, 01:53 AM
Rob Kirkbride
 
Posts: n/a
Default Data Migration

Hi,

Is there a way in JDBC to move data from one database to another without
having to hard-wire the table structure?

I was wondering if I can do a kind of

ResultSet rs = executeStatement("select * from table (from connection 1)
where somecondition")
while (rs.next())
take the resultset and then pass directly into a prepared statement for
an "insert into table" (from connection 2)

I can't see any way other disecting the values from the first query and
using getSQLType.

Any ideas?

Thanks

Rob

Reply With Quote