0

I need to write an expression for derived column. My column name is 'status'. what is the equivalent expression in SSIS for the below condition?

Case when Status Like '%Open%' then 0 when Status like '%Won%' then 1 when status like "%Lost%' then 2 Else 3

Thanks in advance

SqlLearner
  • 763
  • 8
  • 23
  • 37
  • You have a history of not accepting the answers on your questions. You might want to work on this if you want people on the site to continue helping you. – Tab Alleman May 19 '16 at 16:16

1 Answers1

2

Give this a shot:

FINDSTRING(Status,"Open",1) > 0 ? 0 : (FINDSTRING(Status,"Won",1) > 0 ? 1 : (FINDSTRING(Status,"Lost",1) > 0 ? 2 : 3))
R. Richards
  • 24,603
  • 10
  • 64
  • 64