Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variables with Filenames

Status
Not open for further replies.

atiqraza

Programmer
Jan 9, 2007
24
0
0
US
Would anyone happen to know how to create a variable that would contain the filename as an exprssion in SSIS???
 
The tile name itself would be a string as far as the filename being an expression I'm not quite sure what you mean.

If you want to fire different tasks based on the file name then you would put that on either the forkflow or the Task.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
What i am trying to do is insert the filename as a colum. I am using the 'Derived Colum' in the Data flow to Add another colum to my table. However i need to use a variable which would contain the filename. I can not hardcode the filename because i am using a for loop to pick up a bundle of files. IS there anyways i can point the variable to the Filename somehow ?
 
Create a Variable called FileName of type String. In your For Each Loop you want to send the want to Map the fileName to the FileName value (I've done this using an object variable as the source of the loop). Then in your Derived columns task you can use the Variable as the datasource for your column.

Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top