Reputation: 23
I have a source table named A in oracle. Initially Table A is loaded(copied) into table B next I operate DML on Table A like Insert , Delete , Update .
How do we reflect it in table B ? without creating any extra column in target table. Time stamp for the row is not available.
I have to compare the rows in source and target
eg : if a row is deleted in source then it should be deleted in target. if a row is updated then update in target and if not available in source then insert it in the target .
Please help !!
Upvotes: 1
Views: 470
Reputation: 1
If you do not want to retain the operations done in target table (as no extra column is allowed), the fastest way would simply be - 1) Truncate B 2) Insert A into B
Upvotes: 0
Reputation: 3455
Take A and B as source.
Do a full outer join using a joiner (or if both tables are in the same databse, you can join in Source Qualifier)
In a expression create a flag based on the following scenarios.
Now you can send the records to target(B) after applying the appropriate function using Update Strategy
Upvotes: 1