Page 1 of 1

2else statements

Posted: Mon Sep 03, 2007 7:18 am
by scorpion
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..

Posted: Mon Sep 03, 2007 7:23 am
by chulett
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.

Posted: Mon Sep 03, 2007 7:28 am
by scorpion
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.

Posted: Mon Sep 03, 2007 7:31 am
by chulett
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.

Posted: Mon Sep 03, 2007 7:33 am
by scorpion
Sure and I mentioned clearly now about my reqrmnt in my original post..

thanks

Posted: Mon Sep 03, 2007 7:41 am
by chulett
Nothing about your requirement is clear or you'd have an answer by now. Let's stay back in your first post.