Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Data Migration Job


SSIS Data Migration Job

Author
Message
DJH-445911
DJH-445911
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 195
Hello

We have multiple Excel Files (over 300) - each with different column names, all containing at least 1 row of data.

I need to find a way to be able to insert the data within the excel files into a SQL tables. (The name of the excel file is the same name as the SQL table)

I would ideally like to do this using some kind of loop rather than set up 300 different data flows. This job will be executed many times for many different target DBs.

So far we are looking at doing this 2 different ways,

To use MS Access to copy the data, but my colleague is saying that using excel as the source will cause data type issues. or
To use SSIS to loop through the excel files and copy the data. My issue around this is the column mappings will change for each excel file.

Can anyone recommend a solution?

Ideally the source should be kept in an Excel format as they need to be easily editable by our Business Analysts before the transfer, we have columns highlighted in different colours so the analysts can identify which ones they may need to change.

Any pointers, different methods or suggestions etc would be greatly appreciated.

Many thanks in advance

David
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16441 Visits: 13202
SSIS cannot handle changing metadata, at least not out-of-the-box.
And SSIS has issues with the data types as well (actually it is the ACE OLE DB provider which gives the issues).

I would look into scripting with .NET as an alternative.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8310 Visits: 19457
Can anyone recommend a solution?


If you can enforce a common column-naming / data-typing format on all of the Excel files, you have a chance of using SSIS and looping to do this relatively easily. It still won't be easy - largely because Excel does not enforce data types.

But if you allow them flexibility, your solution needs to code around that flexibility - a lot of work - and SSIS is probably not the right tool.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Vikash Kumar Singh
Vikash Kumar Singh
SSC Journeyman
SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)SSC Journeyman (81 reputation)

Group: General Forum Members
Points: 81 Visits: 243
You can try the solution listed here.

SSIS: How to load multiple excel files into multiple SQL tables?

Vikash Kumar Singh || www.singhvikash.in
Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8310 Visits: 19457
Vikash Kumar Singh (7/5/2013)
You can try the solution listed here.

SSIS: How to load multiple excel files into multiple SQL tables?


Although it looks like this will work, SSIS is not really adding anything here - might as well keep the whole thing in T-SQL if following this route.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
DJH-445911
DJH-445911
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 195
Thank you all for your responses, they were very useful to us. We think we have a way to accomplish what we need using Access, with linked tables.

Dave
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search