Bryan,

You are correct as I wanted the source and target tables to be in different 
databases, and so the Chris's solution would have not worked for me.

BTW, I used system procedures to export the data from the source table to a 
file, and then imported the data from that file to the target table to get the 
required job done.

The proposed new feature that you referenced will be a welcome addition to the 
command set of Derby. :)

-Dinesh


--- On Mon, 26/4/10, Bryan Pendleton <[email protected]> wrote:

From: Bryan Pendleton <[email protected]>
Subject: Re: Transfer data between tables that are located in different 
databases
To: "Derby Discussion" <[email protected]>
Date: Monday, 26 April, 2010, 7:40 PM

>> As it is a lot of data that needs to be transferred between tables, the idea 
>> of using the system procedures to export the data from the source table, and 
>> then importing it in the target table appears to be good one. I will 
>> definitely give it a try, and will post the code here if I encounter any 
>> error.
> 
> How about in SQL:
> 
> INSERT INTO target SELECT * FROM source;

The tricky part is that the original poster wanted the source and target
tables to be in separate databases, which makes this solution impractical.

However, Derby 10.6's ij tool will contain a new feature DERBY-4550
https://issues.apache.org/jira/browse/DERBY-4550
which will enable uses such as this in the ij tool, I believe.

thanks,

bryan



Reply via email to