Solved

loop for import excel file with date prefix using ssis package

Posted on 2015-02-18
7
111 Views
Last Modified: 2016-02-15
Hi,

I have a requirement to load data into SQL table. The excel files come with the date on it as below format:

xxxxxxx_2015_02_19_050021

Please let me know how do I loop through the files and load the data into a sql table. and also store this files in SQL table


thanks in advance
0
Comment
Question by:ken hanse
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 100 total points
ID: 40617878
In general, this would be an SSIS package with a For Each File loop to sweep through a given folder for files of a certain type, then those files can be used as the data source in a data flow task.

So .. are these files exactly the same schema?

Also, be advised that SSIS and Excel have known compatibility issues, and Excel docs are not good for data sources as users can do thousands of different things to throw off both normalization and the source to target mapping.
0
 

Author Comment

by:ken hanse
ID: 40627889
Yes, it is same schema. And using 32bit excel driver.
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40630731
How many files will you process by day?
All files? Only the day file?
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:ken hanse
ID: 40638760
Only the day file
0
 
LVL 50

Expert Comment

by:Vitor Montalvão
ID: 40639173
Then use the Import Data wizard to create a daily job and assure that the file has always the same name.
0
 

Author Comment

by:ken hanse
ID: 40640645
sorry Vitor, I just need to explained bit more.

the file format is:

xxxxxx_yyyy_mm_dd_mmss

one file per day

This is on excel xls format. I need dynamically read the file,


Thanks
0
 
LVL 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 400 total points
ID: 40647302
Then use Jim Horn's suggestion. Create a package in SSIS than can go through all files and process only the files that you want.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql 2016 data tools breakdown.. 1 36
MS SQL Conditional WHERE clause 3 47
MS SQL Sever Import/export problem 7 69
Data conversion error in SSIS 3 54
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question