Link to home
Start Free TrialLog in
Avatar of keplan
keplanFlag for Australia

asked on

use of nested statment (CASE or if...else...) in derive column transfromation in SSIS

Hi,

I need to add large case statemnt in a derive column  tranformation in SSIS. The query is similar to below however I need to nested more than the sample below. The simple query like below is throwing an error., i'm not sure what wrong with that syntax. I would appreciate if I can get samples nested query for SSIS derive column transformation.

ISNULL(amt) ? "1":Amt && iif(Amt)=="$0.01 > $1,000" ? "2":Amt

Thanks
Avatar of sachinpatil10d
sachinpatil10d
Flag of India image

Try this

case when isnull(Amt,1) then
      case Amt when 0.01 > 1,000 then 2
      else Amt end
else Amt end
Avatar of keplan

ASKER

Please note: i need in use in derive column transformation in SSIS, you sample is for t-sql
ASKER CERTIFIED SOLUTION
Avatar of Alpesh Patel
Alpesh Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of keplan

ASKER

thanks for that, sorry i am not familiar with Ternary operator, kindly post some samples if possible, and also ca ternary operator be nested?
Avatar of keplan

ASKER

helpful