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

Posted on 2011-09-20
Last Modified: 2012-05-12

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

Question by:keplan
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Expert Comment

ID: 36571874
Try this

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

Author Comment

ID: 36571929
Please note: i need in use in derive column transformation in SSIS, you sample is for t-sql
LVL 21

Accepted Solution

Alpesh Patel earned 250 total points
ID: 36573194
You cannot use Case or If need to use Ternary operator

Condition ? True : False

Author Comment

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

Author Closing Comment

ID: 36945713

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question