January 21, 2010 at 7:41 am
Hi
Is there a way in SSIS to differentiate rows which has same values.
Example
Code Value
1 40
2 40
3 50
4 60
Required Output
Code Value Code Value
1 40 2 40
3 50
4 60
Is is possible with conditional Split ??
Thanks In advance
R
January 21, 2010 at 8:31 am
It sounds like you want to Pivot your data base on the value column so you probably need to use the Pivot transform. I've never used it, but it should do what you are looking to do.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 21, 2010 at 8:45 am
Hi Jack
Actually i have a table where such information is stored and now from there,
i have to split it and dump into 2 separate tables which will contain unique values and i thought of doing this via Conditional Split but not getting the appropriate condition should be used.!!
January 21, 2010 at 9:13 am
I really don't understand your issue. Your example looks like you want to combine rows with duplicate values into a single row with multiple columns, that would be a Pivot.
Now it seems you are saying that you want the duplicated value to go to another table. If this is correct the only way to do it with a conditional split is to have some column in the row that identifies it as a duplicate. For example if you were using SQL Server as the source you could do this in your source query:
SELECT
Code,
VALUE,
ROW_NUMBER() OVER (PARTITION BY VALUE ORDER BY VALUE) AS row_id
FROM
tableA
Then in the conditional split you could send row_id = 1 to one output and where row_id > 1 to another output.
Another option is to put a unique constraint on the value column of destination table and then re-direct errors from that destination to a second destination.
A third option is to use a script component to find the duplicates and send them out a different output.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 21, 2010 at 9:53 am
Thanks Jack
It was a great help :-P:-)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply