Solved

SSIS Conditional Split

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

632 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