Solved

SSIS Conditional Split

Posted on 2009-04-10
2
800 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
[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
2 Comments
 
LVL 11

Accepted Solution

by:
aaronakin earned 500 total points
ID: 24121918
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
ID: 31568909
Thanks...worked well.
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

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.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

752 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