[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-09-20
5
Medium Priority
?
545 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 750 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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