Solved

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

Posted on 2011-09-20
5
488 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:keplan
[X]
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
5 Comments
 
LVL 9

Expert Comment

by:sachinpatil10d
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
0
 

Author Comment

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

Accepted Solution

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

Condition ? True : False
0
 

Author Comment

by:keplan
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?
0
 

Author Closing Comment

by:keplan
ID: 36945713
helpful
0

Featured Post

Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
domain login has permission in database, but gets error 3 25
SQL Recursion 6 33
Can I skip a node in XML? 9 34
T-SQL: How to extract records into a new table 7 19
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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