SSIS - True Lovers
Hello Experts,
I have one text file which content the following detail
Col1 | Col2| Col3| Col4| Col5 --> with | delimiter
0000005| 01| 1| OBG| OBG
0000005| 01 |2| GP| GP
0000106| 01| 1| IM| IM
0000107| 01|1|GM|GM
0000107| 01|1|SN|SN
0000107| 01|1|FM|FM
0000108| 01|1|GP|GP
0000108| 01|2|GS|GS
0000109| 01|1|FM|FM
0000111| 01|1|P|P
0000112| 01|1|D|D
So here I want the output same as col1, Col2, Col3, But I have to Merge the Col4 Rows by delimiter ,which Highlighted mention below.
Col1 | Col2 |Col3| Col4
0000005| 01| 1| OBG,GP
0000106| 01| 1| IM
0000107| 01|1|GM,SN,FM
0000108| 01|1|GP
0000109| 01|1|FM
0000111| 01|1|P
0000112| 01|1|D
Please Explain your answares briefly...I am the new to SSIS.
Appreciated your Help.
August 21st, 2012 10:51am
Hello
myworld343,
You basically want to roll up or aggregate the records by Col1, but then drop any values other than in Col5 that you want to concatenate with a comma between.
I suggest you load the file into a table and then construct the proper SQL to drive a source manager to output the result to the output file.
You can also merger using a Script Transformation if you are not strong in SQL:
Example http://www.texastoo.com/post/2010/03/29/Demystifying-the-SSIS-Script-Component-Part-2.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2012 11:00am
Thanks for your help ArthurZ, I tried it through script task mentioned below and Its work fine.
http://microsoft-ssis.blogspot.com/2011/12/redirect-duplicate-rows.html
August 21st, 2012 2:52pm