Posted: 4/25/2012
Hi I tried to merge 3 text files using UNION ALL TASK(all 3 are different headers).
ex: Text1: abc 123
Text 2: def 456 hello hi
Text3: xyz hi hi hi hi hi hi dsfdsfsdfs
I want output like this:
abc 123
def 456 hello hi
xyz hi hi hi hi hi hi dsfdsfsdfs
UNION ALL is giving me different order like this.....
Can any one suggest me what other options I can use (maybe script task?)
Thank you
Read this post by Alberto Ferrari, might help you figure out your issue: http://sqlblog.com/blogs/alberto_ferrari/archive/2007/04/10/mantaining-order-in-ssis-flow-problems-with-merge.aspx
UNION ALL doesn't maintain order
Thank you, I did used merge and sort, it worked out perfectly, but I had to do 2 dataflows instead of one.
dataflow1: text1+text2 (output1)
dataflow2: output1+text3