Scenario 16: Concatenation of duplicate value by comma separation
Scenario16 : You have two columns in source table T1, in which the col2 may contain duplicate
values.All the duplicate values in col2 of will be transformed as comma separated in the column col2 of target table T2.
Source Table: T1
Col1 Col2
a x
b y
c z
a m
b n
Target Table: T2
col1 col2
a x,m
b y,n
c z
How to achieve this in SSIS in various ways....(inlcuding any SQL quries)......?
Thanks and Regards,
Desparado.
April 18th, 2011 3:30am
Script Component... sort by key (Col1) and use a script like
this to compare the row to the previous row. You will have to do some filtering or redirecting in the Script Component to get the correct records.
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2011 3:41am