| 
	
 | 
 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.
 
[Back to original message] 
 |