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
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 3, 2015 4:49 PM
Points: 14, Visits: 97
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: Friday, May 1, 2015 7:40 PM
Points: 6,033, Visits: 5,290
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
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, March 3, 2015 4:49 PM
Points: 14, Visits: 97
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: Friday, May 1, 2015 7:40 PM
Points: 6,033, Visits: 5,290
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: Friday, April 24, 2015 5:10 AM
Points: 1,118, Visits: 2,233
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