Re: for each file loop question on reading variables
- From: "Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 8 Feb 2007 19:51:51 +0000
OK
You can use the Scipt task to do this. I am not sure though what it is that you want to do. Is the thing that you want to do based on filename a control lfow thing or is it a data thing. This could affect the solution.
In the pipeline (data). You may want to look to add the variable into the pipeline as a column (Deried Column Transform) and then use the Condition Split transform to test the value therein and do something about it.
In the Control Flow you may want to use the Script task. You can lock the variable you want to examine on the Script node of the task custom UI and then within the task you can simply say something like
Dim s As String = Dts.Variables.Item("My Variable Name").Value.ToString()
If what you want to do is simply make a FF Connection Manager point to this new file then you need to look at property expressions. Highlight the Conection Manager, hit F4, ind the Expressions item and hit the ellipses. Choose the Connection String property on the left and then hit the ellipses on the right and drag the variable you want into the expression pane at the bottom
Looping over files with the Foreach Loop
(http://www.sqlis.com/55.aspx)
--
Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com
"news.microsoft.com" <simonwhale@xxxxxxxxxxxx> wrote in message news:OlFPld5SHHA.496@xxxxxxxxxxxxxxxxxxxx:
Hi,
i have use a script to read the filenames from a for each file loop, so
that
i can perform certain tasks depending on the filename.
does anyone know a good example that i can use?
Simon
.
- References:
- for each file loop question on reading variables
- From: news.microsoft.com
- for each file loop question on reading variables
- Prev by Date: Re: Importing selective rows from Access database
- Next by Date: Re: running a SSIS package from a scheduled job sql server 2005
- Previous by thread: for each file loop question on reading variables
- Next by thread: Importing selective rows from Access database
- Index(es):
Relevant Pages
|