|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 16, 2012 5:34 PM
Points: 9,
Visits: 67
|
|
I am new to SSIS and I have created a package that loops through files in a directory and imports them into a table. The package works fine but I would like to add the file name that the data came from and add it to a column in the import file or into the table that it was imported into. I have tried adding a derived column but cannot seem to get the value from the variable into it.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
A derived column is the right path. What are you using to loop through the directory? A For-Each-Loop?
Also, why don't you add a data-viewer to see what is in the pipeline immediately following the derived column task.
CEWII
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, May 16, 2012 5:34 PM
Points: 9,
Visits: 67
|
|
| I was able to finally get it to work. I had to Cast the variable and allow for a longer string. Thank you for your suggestion.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
|
|
Wonderful, glad to hear it..
CEWII
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Yesterday @ 7:59 PM
Points: 1,106,
Visits: 2,113
|
|
bob_kudulis (4/16/2010) I am new to SSIS and I have created a package that loops through files in a directory and imports them into a table. The package works fine but I would like to add the file name that the data came from and add it to a column in the import file or into the table that it was imported into. I have tried adding a derived column but cannot seem to get the value from the variable into it.
Check this post.
--- SSIS Tasks Components Scripts Services | http://www.cozyroc.com/
|
|
|
|