This is just to show how the expression should be constructed in the derived transformation. I wouldn't suggest doing it this way since it is very hard to maintain.
Refer @billinkc answer to this question Convert CASE expression in SQL to derived column in SSIS
Here is how the expression should be written in Derived transformation.
(FINDSTRING(FixedARMRateReductionLimit,"%",1) > 1) ? ((DT_NUMERIC,5,2)SUBSTRING(FixedARMRateReductionLimit,1,FINDSTRING(FixedARMRateReductionLimit,"%",1) - 1)) : (FixedARMRateReductionLimit == "Weekly PMMS Rate" ? (0.35) : (0.02))
Formatted version of the expression.
(FINDSTRING(FixedARMRateReductionLimit,"%",1) > 1)
? (
(DT_NUMERIC,5,2)
SUBSTRING( FixedARMRateReductionLimit,
1,
FINDSTRING(FixedARMRateReductionLimit, "%", 1) - 1
)
)
: FixedARMRateReductionLimit == "Weekly PMMS Rate"
? (0.35)
: (0.02))
Sample data used:
SELECT c1 AS FixedARMRateReductionLimit
FROM
(
SELECT '2.00%' AS c1
UNION SELECT '13.95%' AS c1
UNION SELECT '%52.00%' AS c1
UNION SELECT '%%' AS c1
UNION SELECT '85.%42%' AS c1
UNION SELECT 'Weekly PMMS Rate' AS c1
UNION SELECT 'Monthly PMMS Rate'
) T1
Output of derived transformation when viewed in data viewer:
