Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:55:55+00:00 2026-06-15T08:55:55+00:00

Quick intro to the existing process: an SSIS foreach loop imports a flat files

  • 0

Quick intro to the existing process: an SSIS foreach loop imports a flat files into a SQL Server table by looking for any text file in the entry path folder, after the import, it dumps the flat files into an archive folder. This happens with a total of four flat files and since it’s only looking for any text file, it has no problem.

However, the new idea presented was instead, SSIS should run a process which first captures the date and State off of the text file (from the file name, not inside the file), then insert the data into SQL Server along with the State and date, which was captured, then archive the files. The idea behind this was that if a date was a month behind or ahead, SSIS wouldn’t import the file (or if the year was wrong, it wouldn’t import it).

So now
– SSIS first needs to check to see if four files exist.
– If four files exist, then it moves into the foreach loop (at least, I’m guessing this would be the best way to approach this problem).
– In each loop, a process needs to parse the date and State from the file name and it needs to import the data into SQL Server, adding the date and State parsed into the appropriate columns.
– Then it needs to archive that file and move on to the next one.

I’ve never done any parsing, and I tried playing around with expressions and connection strings to search for the current month and year, but no luck.

(Finally, I know very little C#, so script tasks are out of my league).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:55:56+00:00Added an answer on June 15, 2026 at 8:55 am

    Forgot to post my solution: without using any C# or VB, I found a way to insert the name of the file into a table and parse the file name using TSQL. Using an “Execute SQL Task” you can use the SQL statement below this:

    INSERT INTO Table VALUES (?)
    

    With a string variable for the project set to be the current file’s name, you will set that under “Parameter Mapping.” From there, you’ll have the full file name in a SQL table and can parse it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a quick way ( existing method) Concatenate array element into string with
I want to do some quick inserts but avoid duplicates into a Table. For
We often use quick one-off SQL files to insert or update data in an
Before I dive into the disscusion part a quick question; Is there a method
Hey guys quick question, I currently have an insert statement $query= INSERT into new_mail
just a quick question.. how do you accept an arraylist into a method? Right
I have an existing project that I imported into subversion using TortoiseSVN. Total project
I put together a quick WinForm/embedded IE browser control which logs into our company's
I'm testing my existing apps in VS 2010, and ran into my first break.
Quick one I hope - I'm just about to delve into a Delphi 5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.