Merge tables across Schemas with Oracle

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Merge tables across Schemas with Oracle

Post by polsol » Fri 05 Jun 2015 06:10

I have an application that requires updating one table from another.
Problem is that the tables are under different user accounts (schemas) on Oracle.
Oracle has a Merge utility but apparently it only works for tables within the same user/schema.
What is the simplest/most efficient way to do this with Unidac?
In essence I'm taking trying to take some columns from one table (third party vendor's table in their schema) and adding/updating them within a second table (in my schema) that has additional columns.
I need 'my table' because I have to expand on the functionality (by adding additional columns) of the vendors data for my own application.
I realise that I could make a client detail relationship with the additional columns in a second table but just wondering if some form of 'merge' would work across schemas.

Thanks.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Merge tables across Schemas with Oracle

Post by AlexP » Tue 09 Jun 2015 10:39

Hello,

For data synchronization you can use our CRBatchMove component, that allows transfer data from one DataSet to another automatically. Moreover, in this component, you can choose behaviour modes on finding identical records -

TCRBatchMove.Mode = (bmAppend, bmUpdate, bmAppendUpdate, bmDelete)

You can find more detailed information about this component in the UniDAC documentation: https://www.devart.com/unidac/docs/#dev ... chmove.htm .

polsol
Posts: 71
Joined: Sun 20 May 2007 13:29
Contact:

Re: Merge tables across Schemas with Oracle

Post by polsol » Tue 09 Jun 2015 14:21

Thanks Alex.
I thought there was something I was missing - and that was to look under the data access tab and not the Unidac ones.
Bit of a 'duh' moment as I was sure Devart had thought of this and I'd read it somewhere.

Cheers,
Tony

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Merge tables across Schemas with Oracle

Post by AlexP » Wed 10 Jun 2015 10:07

If you have any further questions, feel free to contact us.

Post Reply