nubianwarrior
MIS
I'm trying to create a derived column using the conditional operator.
I have a source column called f_print_task that contains the following values 0,1,2,3.
Based on the value in the f_print_task column I need to populate two destination columns with values.
if f_print_task = 0 I want to put values 0 in the destination column NonPM and OnPM
if f_print_task = 1 I want to put values 0 in the destination column NonPM and value 1 in the OnPM column
if f_print_task = 2 I want to put values 1 in the destination column NonPM and value 1 in the OnPM column
if f_print_task = 3 I want to put values 1 in the destination column NonPM and value 0 in the OnPM column
Currently I have for my expression in the derived column transformation editor FO_PRINT_TASK >=0 ? 0 : 0 which works....but I need to add the other three expressions for this same column...... something like
FO_PRINT_TASK >=0? 0:0 ? 0:1 ? 1:1 ? 1:0 but this errors out.
Can this be done using a conditional expression?
I have a source column called f_print_task that contains the following values 0,1,2,3.
Based on the value in the f_print_task column I need to populate two destination columns with values.
if f_print_task = 0 I want to put values 0 in the destination column NonPM and OnPM
if f_print_task = 1 I want to put values 0 in the destination column NonPM and value 1 in the OnPM column
if f_print_task = 2 I want to put values 1 in the destination column NonPM and value 1 in the OnPM column
if f_print_task = 3 I want to put values 1 in the destination column NonPM and value 0 in the OnPM column
Currently I have for my expression in the derived column transformation editor FO_PRINT_TASK >=0 ? 0 : 0 which works....but I need to add the other three expressions for this same column...... something like
FO_PRINT_TASK >=0? 0:0 ? 0:1 ? 1:1 ? 1:0 but this errors out.
Can this be done using a conditional expression?