if then else
Moderators: chulett, rschirm, roy
if then else
Hi,
I am looking for simple IF-THEN-ELSE Logic for my below reqrment...
Could any one help me on this please..
if column1 = 'DSX' Then 'Datastage' Else 'Dstage' Else 'Ascential'
how do i keep im if then else in transformer?
Thanks all!
I am looking for simple IF-THEN-ELSE Logic for my below reqrment...
Could any one help me on this please..
if column1 = 'DSX' Then 'Datastage' Else 'Dstage' Else 'Ascential'
how do i keep im if then else in transformer?
Thanks all!
Thanx&Regards
scorpion
scorpion
Re: if then else
Your requirement is unclear.
Anyhow I will give you a sample logic. Check if this is fine.
If Col1 = "DSX" Then "DataStage"
Else If Col1 = "DX" Then "Dstage"
Else "Ascential"
If you want exact solution then give the condition to get "Dstage" in your requirement.
Anyhow I will give you a sample logic. Check if this is fine.
If Col1 = "DSX" Then "DataStage"
Else If Col1 = "DX" Then "Dstage"
Else "Ascential"
If you want exact solution then give the condition to get "Dstage" in your requirement.
----------------
Abu
Abu
Still unclear. If you spell out what needs to happen in writing under all conditions, it should be pretty easy to do whatever it is you need to do.
If ColumnA = 'dsx' then populate TARCOL1 with what?
If ColumnA is null, then populate TARCOL2 & TARCOL3 with what?
If ColumnA = 'dsx' then populate TARCOL1 with what?
If ColumnA is null, then populate TARCOL2 & TARCOL3 with what?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Let's try again. This makes no sense as you've said it is a source column:
"if this column values is also null then populate TARCOL3."
Stop saying the same thing over and over and rephrase it so it makes more sense. Which column is 'this column'? All I can gather right now is if ColumnA = 'dsx' then you need to populate TARGETCOL with TARCOL1 else populate TARGETCOL with TARCOL2. So far, that's just one simple perfectly normal if-then-else statement.
Other than that...
"if this column values is also null then populate TARCOL3."
Stop saying the same thing over and over and rephrase it so it makes more sense. Which column is 'this column'? All I can gather right now is if ColumnA = 'dsx' then you need to populate TARGETCOL with TARCOL1 else populate TARGETCOL with TARCOL2. So far, that's just one simple perfectly normal if-then-else statement.
Other than that...
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thanks for your reply chullet,
Othere than that
if TARCOL2(second source column) also null then populate TARGETCOL with TARCOL3(3rd source column)..
so to populate TARGETCOL:
if the value of the ColumnA = 'dsx' then map TARCOL1,
Else map TARCOL2.if this column value(TARCOL2) is null then mapTARCOL3.
here i need 2 ELSE conditions.
Othere than that
if TARCOL2(second source column) also null then populate TARGETCOL with TARCOL3(3rd source column)..
so to populate TARGETCOL:
if the value of the ColumnA = 'dsx' then map TARCOL1,
Else map TARCOL2.if this column value(TARCOL2) is null then mapTARCOL3.
here i need 2 ELSE conditions.
Thanx&Regards
scorpion
scorpion
Ok, that makes more sense. You need two if-then-else expressions, not just "two else conditions". Psuedo-code for the TARGETCOL derivation:
You'll need to add link names and make it all PX-like (not sure about IsNull in PX) but you should get the idea now.
Code: Select all
If ColumnA = 'dsx' Then TARCOL1 Else If IsNull(TARCOL2) Then TARCOL3 Else TARCOL2
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers