Hello All,
We have two tables say A,B with same meta data which has some primary keys and date field. My aim is to insert a row from A if it is not in B into C table. else insert a row from B which is latest row(less than 4 months) based on date into C table.
Could you please guide how to do it in server/parallel jobs.
thanks in advance.
Comparison between two tables
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Why not just build the appropriate difference query as SQL and execute that?
Otherwise, perform a reference lookup and constrain the output to be that the lookup failed (perhaps use reflink.NOTFOUND link variable)
Otherwise, perform a reference lookup and constrain the output to be that the lookup failed (perhaps use reflink.NOTFOUND link variable)
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.
kduke,
table A and B have a,b,date as fields. a and b are primary keys. Now i need to build a new table say C based on those two tables. C has also same metadata as A and B. Here are the conditions for extracting data to C from A and B.
if the row is in A but not in B then insert into C
if the row is in C and is <4months old insert row into C.
if the row is in A and B then insert into C from A.
I am thinking to create a hash file from A and lookup to B.then insert to C. But i am confusing about logic in transformer. also i need to know how you can manipulate date>4months. based on that i have to have latest dates in C.
thanks a lot.
table A and B have a,b,date as fields. a and b are primary keys. Now i need to build a new table say C based on those two tables. C has also same metadata as A and B. Here are the conditions for extracting data to C from A and B.
if the row is in A but not in B then insert into C
if the row is in C and is <4months old insert row into C.
if the row is in A and B then insert into C from A.
I am thinking to create a hash file from A and lookup to B.then insert to C. But i am confusing about logic in transformer. also i need to know how you can manipulate date>4months. based on that i have to have latest dates in C.
thanks a lot.