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
scorpion
Participant
Posts: 144 Joined: Thu May 12, 2005 4:19 am
Post
by scorpion » Mon Sep 03, 2007 7:18 am
Hi All,
Can any one explain,How to use 2 else statements in if-then-else statements in transformer stage.
reqrmnt is:
if columnA='DSX' then populate col1,else col2,else col3.
can any one please help me on this..
Thanx&Regards
scorpion
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Sep 03, 2007 7:23 am
You can't have two 'else' statements in a single expression. Of course, you can have multiple else statements in multiple in-line expressions but each only has two halves. One 'if' and one 'else' per.
If you need to populate three different columns, simply use three appropriate expressions, one in each derivation.
-craig
"You can never have too many knives" -- Logan Nine Fingers
scorpion
Participant
Posts: 144 Joined: Thu May 12, 2005 4:19 am
Post
by scorpion » Mon Sep 03, 2007 7:28 am
Hi Chullet,
Thanks for the reply,
And my reqrment is like:
if the value of the ColumnA = 'dsx' then populate TARCOL1,Else populate TARCOL2.if this column values is also null then populate TARCOL3.
Thanx&Regards
scorpion
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Sep 03, 2007 7:31 am
I know - I see now you already have a post on this very subject. Starting a second does nothing but cause unnecessart double-work.
Please use your original post to continue this conversation.
-craig
"You can never have too many knives" -- Logan Nine Fingers
scorpion
Participant
Posts: 144 Joined: Thu May 12, 2005 4:19 am
Post
by scorpion » Mon Sep 03, 2007 7:33 am
Sure and I mentioned clearly now about my reqrmnt in my original post..
thanks
Thanx&Regards
scorpion
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Mon Sep 03, 2007 7:41 am
Nothing about your requirement is clear or you'd have an answer by now. Let's stay back in your first post.
-craig
"You can never have too many knives" -- Logan Nine Fingers