Gray5452
asked on
Case statement in SSIS expression lingo
What’s the expression language within a derived column transform to do CASE type stuff…
Basically, I’m adding a column that is a retainer percent that adjusts client spend based on date so if
Tape_aired < 1/31/11 then RetainerPerc = .97 for that row
Tape_aired between 1/31/11 and 2/15/11 then RetainerPerc = .984 for that row
Tape_aired between 2/15/11 and 3/30/11 then RetainerPerc = .992 for that row
THanks all as this site has been amazing for me...
Basically, I’m adding a column that is a retainer percent that adjusts client spend based on date so if
Tape_aired < 1/31/11 then RetainerPerc = .97 for that row
Tape_aired between 1/31/11 and 2/15/11 then RetainerPerc = .984 for that row
Tape_aired between 2/15/11 and 3/30/11 then RetainerPerc = .992 for that row
THanks all as this site has been amazing for me...
ASKER
thanks, that is much appreciated Emil,,,would the brackets just go back to back?
I'm not sure if typed it correctly but below should give you the answer:
(Field==2?1:(Field==3?1:2) )
Regards
Emil
(Field==2?1:(Field==3?1:2)
Regards
Emil
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This should help
http://www.itcouple.com/ssis-if.aspx
You can nest them using brackets... Let me know if you need an example (I actually need to post an example the above page with nesting).
Hope that helps
Emil