I have a Target table with the following fields
T_MEM
-----
ID number
M_SEQ varchar2
Name varchar2
..
The ID and Name come from the source but the M_SEQ (sequence key)
has to be populated from a sequence generator.
what i want to acheive here is if a row exists in the T_MEM any
matching ID coming from source i want to update the T_MEM table with
the Name and other fields coming from source.
If the no row exists for the ID coming from source then i have to
insert a record into the T_MEM table with a new row and a sequnce value for M_SEQ.
to achieve this i have used a connected lookup on target and I try to match the
ID's and return the all ID and M_SEQ port from the lookup to an expression transformation
and i connect name and other fields from the source to the Expression tranformation.
I tried to use a router after expression to check if the ID is giving a default value
say -999 if it does then i send those rows to an Update strategy for Insert and
if it does not return default value i use Update Strategy for Update and each of this is
connected to two instances of target T_MEM.
I am not sure how to fit in the sequnce logic for M_SEQ in this and is my approach right.
thanx
T_MEM
-----
ID number
M_SEQ varchar2
Name varchar2
..
The ID and Name come from the source but the M_SEQ (sequence key)
has to be populated from a sequence generator.
what i want to acheive here is if a row exists in the T_MEM any
matching ID coming from source i want to update the T_MEM table with
the Name and other fields coming from source.
If the no row exists for the ID coming from source then i have to
insert a record into the T_MEM table with a new row and a sequnce value for M_SEQ.
to achieve this i have used a connected lookup on target and I try to match the
ID's and return the all ID and M_SEQ port from the lookup to an expression transformation
and i connect name and other fields from the source to the Expression tranformation.
I tried to use a router after expression to check if the ID is giving a default value
say -999 if it does then i send those rows to an Update strategy for Insert and
if it does not return default value i use Update Strategy for Update and each of this is
connected to two instances of target T_MEM.
I am not sure how to fit in the sequnce logic for M_SEQ in this and is my approach right.
thanx