Subject Re: [IBO] Copy entire records without specifying the fields? IB_Datapump?
Author John vd Waeter
Jason Wharton wrote:
> John wrote:
>
>>>I want to copy records from tables in database A
>>>to tables in database B. Both databases have the
>>>same structure. Records in source_table do not
>>>exist in destination_table.
>>>
>>>Is there a way to read a record from A.table
>>>and subsequently insert it in the corresponding
>>>B.table regardless of the recordstructure (which
>>>is the same in both tables) ?
>>>
>>>I have about 30 tables to process this way and
>>>somehow I think I shouldn't write 30 different
>>>SELECT and corresponding INSERT statements
>>>specifying all fields etc.
>>>
>>>Can/should I use IB_Datapump?
>
>
> Roger responded:
>
>>INSERT INTO A_TABLE
>>SELECT * FROM B_TABLE
>>WHERE .....
>
>
> The tables are in separate databases, so using a single SQL statement is not
> sufficient. TIB_Datapump is the best way to go.
>
> Additionally, I recommend that you do it local to the inserts as they are
> sent one at a time, vs. the selection of records which allows for the
> network to bunch them up with multiple records in a single packet.
>
> In short, if you can, pull, don't push.
>

Hi Jason, Roger,

Right... I understand the problem with Rogers solution, I even
understand the reason for pulling instead of pushing (I think), BUT...
there is very little documentation on how to use a powerful component
like the IB_Datapump. Even Google (which in times like this IS my
friend) has almost nothing... 12 hits on "IB_Datapump", none with an
example...

Maybe the database-gurus understand what the properties, events and
methods all are to be used for, I certainly don't.

I know you're quite busy getting the IBO-update finished, but could you
point me in a direction: how do I connect the datapump to 2 databases A
and B and how can I make it insert records from A.Table into B.table?

thanks,
John