To perfrom Case like operation

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The INDEX() Function is correct; but use "INDEX(FKPOSSTR_IN.SEC_CODE,'.AX',1)" instead. The "2" that you used tells INDEX to use the 2nd occurrence position, and if it doesn't occur twice then the returned value will always be "0", which equates to "False".
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

It works .. Ohh it was so simple... :roll:

-Thanks a lot.
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

Correct, and then based on this I want to perfrom the case statment.
But I think transfrom is not support to handle case function. is it so? :shock:

is not then what the equivalent for case statement in DS? 8)

ArndW wrote:The INDEX() Function is correct; but use "INDEX(FKPOSSTR_IN.SEC_CODE,'.AX',1)" instead. The "2" that you used tells INDEX to use the 2nd occurrence position, and if it doesn't occur twice then the ret ...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no case statement in a Transform stage, you need to use an IF-THEN-ELSE construct. There is a Switch stage that you can look into.
Post Reply