Solved

SSIS Conditional Split

Posted on 2009-04-10
2
793 Views
Last Modified: 2013-11-10
Hi Everyone,

I have the need to implement something similar to a case statement in an SSIS package.

The scenario is this:

I have the following:

Conditional Split  --> Dervired Column --> Summarize Transform

After the Derived Column Transform has been executed there are a variety of new columns that are created. One of the is Qty.

What I need to do is change the Qty value to 0 of Products that have a certain product code and then pass the changed data back to the Summarize Transform as well as all the other data that didn't need to be changed.

What is the best course of action to accomplish this? Another Conditional Split and a Derived Column Transform....tried this and ofcourse I can't have multiple input paths to a Summarize Transform.

Not sure how to go about this. Help please!

Thanks

JF
0
Comment
Question by:smacky75
2 Comments
 
LVL 11

Accepted Solution

by:
aaronakin earned 500 total points
Comment Utility
Is the Qty column being created in the Derived Column component?  If so, what condition do you have to create the column?

You can generally use the shorthand (? :) for IF ELSE to create the column.  For instance, in your condition,

ProductCode == "XXXX" ? 0 : ProductQty

You would need to substitute XXXX for your product code, and substitute the ProductQty column as your actual column or the existing condition.  If you're using a condition to determine the Qty already, you can use this instead...

ProductCode == "XXXX" ? 0 : (your condition)
0
 

Author Closing Comment

by:smacky75
Comment Utility
Thanks...worked well.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now