Hello all ,
This is what I want to do :
I have 2 tables with 2 columns
the first have columns row_id and data_load_insert and the second have row_id and data_load_update
I want to make a table from these 2 table like :
row_id, data_load_insert, data_load_update
of course a row_id can have a data_load_insert and a data_load_update
If you have an idea to perform it ...
thanks in advance for your help dsxians !
do a sql union in oracle stage
Moderators: chulett, rschirm, roy
Various options:
1. SQL Join:
If it is equi join
If it is full outer join
2. Use lookup for joining and then populate.
3. Populate data from first table(insert), then from the second table (update else insert).
1. SQL Join:
If it is equi join
Code: Select all
select a.rowid,data_load_insert,data_load_update
from tablea a,tableb b
where a.rowid=b.rowid
Code: Select all
select a.rowid,data_load_insert,data_load_update
from tablea a full outer join tableb b on
where a.rowid=b.rowid
3. Populate data from first table(insert), then from the second table (update else insert).
Success consists of getting up just one more time than you fall.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In particular observe that what you want to do is NOT a UNION, it is a full outer join. You could effect this in Oracle OCI stage, by specifying the full outer join in the Table Name field. A lookup won't do it - you would need two lookups, which would be inefficient.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.