Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSIS variable added to import file Expand / Collapse
Author
Message
Posted Friday, April 16, 2010 9:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 30, 2013 12:25 PM
Points: 9, Visits: 69
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.
Post #904967
Posted Friday, April 16, 2010 12:09 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
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
Post #905103
Posted Friday, April 16, 2010 4:44 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 30, 2013 12:25 PM
Points: 9, Visits: 69
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.
Post #905269
Posted Friday, April 16, 2010 7:07 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
Wonderful, glad to hear it..

CEWII
Post #905314
Posted Wednesday, April 21, 2010 10:24 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 9, 2014 5:27 PM
Points: 1,117, Visits: 2,219
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/

Post #907902
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse