• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 572
  • Last Modified:

SSIS package to read and import date from TXT files into SQL table

Hello Experts, I'm writing a SSIS package in SQL2008R2 to read and import flat files into SQL tables. I have done this in the past with XML files, where you are able to set the name of the XML file as a variable, however the flat file task does not have this option. How do I set the file name and get the connection source to the file to be a variable from the for each loop container?
  • 2
1 Solution
Hi, yes it is possible, probably similar to your XML file process.

Here is the part in a MS tutorial, that will help you.

EddieITAuthor Commented:
I got that far, on the for each loop container variable settings are clear, however when I add a file task to the data flow of the container, I'm not able to specify the file name as source as a variable

Not seeing exactly what you have...But I think the problem is here....

If you look at your flat file connection manager.

Look at the Properties, and the Expressions,
The Connection string connection has to be the variable you have set for the filename.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now