![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In my application I am copying 2 million records from an oracle table to sqlserver table. While this is occuring 3 fields need to be derived and I am doing all of them in single derived column transformation. two of these use the same if conditional to determine how column is derived. It looks like the only way to do a conditional is using ?: operator. So in transformation I have created two derived columns and for each of them I have repeated my if conditional so that I can fill fields. This does not seem to be a good way to do it for performace purposes. Is their a better way of doing this such as in one of those expression areas make a expression that will calculate an assign both of these values at one time without doing condtion twice. The calculations are different for each column, but if statment is same. Below are the two expressions I used, 1 for each dervied column (ISNULL(IMPAIRDT) || IMPAIRDT == 0) ? 0 : 1 (ISNULL(IMPAIRDT) || IMPAIRDT == 0) ? 0 : (ADMTDATE - IMPAIRDT) Is their a way to do if else statments with multiple lines inbetween them in expressions? |
![]() |
| Thread Tools | |
| Display Modes | |
| |