You are here: ssis - Export to a file and Rename file « MsSQL Server « IT news, forums, messages
ssis - Export to a file and Rename file

Posted by gelangov on 04/12/07 19:25

I have a table, that has a column which determines the file name. I
want to export a file and rename it immediately.

For Ex:
Select Id, count(*)
from Mytable
group by ID

gives the following:

ID Count
1 100
2 200
4 50

Now in my SSIS package, I am able to create a Execute SQL task (Select
distinct ID from MyTable), followed by a For Each loop container.
Inside the For Each loop container, I have a OLE DB source and a flat
file destination. OLE DB source has the following: select top 10 *
from MyTable where id =?. I am able to eport file for ID=1. Then
it gets replaced by file for ID=2 which then gets replaced by file for
ID = 4. So I want the test.txt to be renamed to test1.txt, test2.txt
and text4.txt. I tried using File system task or Execute process
task. It did not work. Please let me know how I could make it work.
Thank you for your help.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация