Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rewrite the CASE statement into an SSIS expression?

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?

like image 343
pentjosh Avatar asked Feb 15 '13 11:02

pentjosh


1 Answers

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".

like image 154
Justin Avatar answered Nov 15 '22 08:11

Justin