Author |
Topic |
kissa49
Starting Member
10 Posts |
Posted - 2009-12-11 : 14:42:29
|
Hi,I am trying to add a footer row at the bottom of a txt file that already contains data in it.If I write to that file in a data flow from OLE DB Source, using that file as the "Flat File Destination" and not overwriting it, a whole row is created with semicolons, because that file is semicolon delimited and needs to stay that way.Any input on this is appreciated as I am breaking my head trying everything and nothing works.THANK YOU! :) |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2009-12-11 : 14:56:37
|
I'm not sure if there is a better way, but I'd put your footer into a new file and then concatenate your delimited file with this new file via a type command: type *.extension > c:\somenewconcatfile.txtThe concatenating via type command is done alphabetically, so name your files appropriately.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog"Let's begin with the premise that everything you've done up until this point is wrong." |
 |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-12-11 : 14:59:50
|
One way is to create a separate flat file connection manager for the footer row alone (without any delimiters of course). And then write to the same file from OLE DB source without overwriting |
 |
|
kissa49
Starting Member
10 Posts |
Posted - 2009-12-11 : 15:53:17
|
Tara, is type a function in SQL2005? Can't find anything on it. Never heard of it before.Thanks! |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
kissa49
Starting Member
10 Posts |
Posted - 2009-12-11 : 23:36:18
|
Unfortunately I need to stay in SSIS |
 |
|
kissa49
Starting Member
10 Posts |
Posted - 2009-12-11 : 23:50:20
|
I think that I can use filestream to open the file, write my txt string to it, and then close it. Can not find anything on how to do that anywhere. |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
kissa49
Starting Member
10 Posts |
Posted - 2009-12-13 : 09:02:34
|
Thanks, I will try that. |
 |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-12-13 : 12:31:41
|
Did you try the other suggestion? |
 |
|
|