Transformer logic
Posted: Tue Jun 26, 2007 5:35 am
Hi Everybody,
I stuck with to implement some logic in my datstage job.
Below is the logic to populate one of my target column 'xxx'.
my source table is : SCORPION
In that i have columns like 'aaa','bbb','ccc'
logic to populate 'xxx'target column IS:
If the SCORPION.aaa(primary record) is not NULL then populate the target column XXX using logic below,
else if the SCORPION.aaa(primary record) is NULL then leave blank.
so if SCORPION.aaa(primary record) is not null:
select the 'bbb' for the secondary record that corresponds to the scorpion.ccc = scorpion.aaa for the primary record.
SQL is(if aaa is not null):
select v2.bbb from SCORPION V1,SCORPION v2 where the v2.ccc = v1.aaa
I need to implement in transformer level ,rather than database stage.
please advise me to resolve it.
I stuck with to implement some logic in my datstage job.
Below is the logic to populate one of my target column 'xxx'.
my source table is : SCORPION
In that i have columns like 'aaa','bbb','ccc'
logic to populate 'xxx'target column IS:
If the SCORPION.aaa(primary record) is not NULL then populate the target column XXX using logic below,
else if the SCORPION.aaa(primary record) is NULL then leave blank.
so if SCORPION.aaa(primary record) is not null:
select the 'bbb' for the secondary record that corresponds to the scorpion.ccc = scorpion.aaa for the primary record.
SQL is(if aaa is not null):
select v2.bbb from SCORPION V1,SCORPION v2 where the v2.ccc = v1.aaa
I need to implement in transformer level ,rather than database stage.
please advise me to resolve it.