Solved

SSIS Conditional Split

Posted on 2009-04-10
2
796 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

831 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