Subject Re: [firebird-support] Automate transfer data from one database structure to another
Author Ann W. Harrison
Namit Nathwani wrote:
>
> Let's have it the other way round. I have an empty database with all new
> stuff in it. I just want to get data from same named tables in an older
> table into the matching tables <g>, if a field is not found forget it's
> data and a new one is found let it stay empty.
>

I'd use QLI and the following set of commands:

qli> ready old_database.fdb as source
qli> ready new_database.fdb as target
qli> for x in target.rdb$relations with x.rdb$system_flag = 0 or
con> x.rdb$system_flag is null
con> begin
con> print "target."||x.rdb$relation_name || " = source." ||
con> rdb$relation_name on "foo.qli"
qli> @...

For each table in the target database, qli will move the data from the
source database matching relation names and field names.

Regards,


Ann