Combining text files using SSIS
I have 3 flat files containg data like this
File 1 : A B C D E
File 2 : 1 2 3 4 5
File 3: 6 7 8 9 0
I need an output file like
A 1 6
B 2 7....
E 5 0
My source files have 1 value of data in a row, so essentially more like a fixed width file.
I tried using Union All but the values are populated one after another and i cannot use Merge as i want the output in a particular order and not sorted order. Any suggestions are welcome. Thanks!
April 28th, 2011 3:00pm
Are there more rows in each file e.g. File1 would look like:
A B C D E
F G H I J etc. ?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 3:13pm
the file is like
A
B
C
.....
Yes,all the source files have multiple rows but equal # of rows
April 28th, 2011 3:34pm
So one char per column or values across?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 3:59pm
VloveSushi,It is perhaps possible to Unpivot the data once it is in a table as per http://www.bimonkey.com/2009/07/the-unpivot-transformation/
This is why I am asking how the input looks like to determine what an interim manipulation should be.Arthur My Blog
April 28th, 2011 4:00pm
No, not just 1 character. I specified them as A, just to show they were strings. So the files are like
File 1:
Apple
Ball
Cat
File 2
10
20
30
File 3
100
200
300
and i need an output file like
Apple 10 100
Ball 20 200....
Hope i'm being clear!
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 4:02pm
Easy.
All you need is a row numbering script or
row number custom component.
Read all three files with Flat File Sources. Send each flow through the row numbering script or component. Send each flow through a Sort component to sort by row number. Use two Merge Joins to merge the three flows.
Talk to me now on
April 28th, 2011 4:56pm
i cant find the script from the hyperlink and cant install new component on my server. Can you help me find the script or a workaround. Thanks in advance.
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 5:48pm
Sorry about that - the link to the script should work now!
Talk to me now on
April 28th, 2011 5:58pm