How to rewrite the CASE statement into an SSIS expression?

pentjosh picture pentjosh · Feb 15, 2013 · Viewed 16.3k times · Source

I have the following SQL query that I need to use in a Derived Column Transformation available in SSIS.

CASE WHEN A IN (1,2,3) THEN "ABC"
ELSE "NA" END

How do I rewrite this statement into an SSIS expression?

Answer

Justin picture Justin · Feb 15, 2013

Derived Column Expression Code:

A == 1 || A == 2 || A == 3 ? "ABC" : "NA"

It will chek if A is equal to 1 or 2 or 3 and if yes, will be "ABC" else "NA".