如何使用SSIS将数据从多个源(文本和Excel)加载到单个表中 [英] How do I Load Data from Multiple Source (Text & Excel) Into Single Table Using SSIS

查看:99
本文介绍了如何使用SSIS将数据从多个源(文本和Excel)加载到单个表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,



我无法使用SSIS将来自多个源(Excel和Text)的数据加载到单个SQL Server表中。就像我刚接触这个主题一样,找不到解决方案。当我在线浏览解决方案时,我找到了这个页面(代码项目),发现了一些有趣的文章,并了解了很多新的东西。并想知道解决方案。



以下是解释:

文件夹包含相同的结构化文件(相同的列数,订单和

信息)有三种不同的格式(.xls,.xlsx& .txt)。

创建一个解决方案(单个包)将这三种不同的格式文件加载到

单目标SQL服务器表。



我工作的数据是一个简单的雇员数据

Greetings,

I am unable to load data from multiple sources(Excel and Text) into single SQL server table using SSIS. As in am new to this subject, couldn't find solution for this. When I am browsing for solutions online I found this page(Code Project) and found something interesting about this articles and got to know many new things. And wanted to know solution for this.

Here is the explanation:
A folder contains same structured file (same column count, order and
information) in three different format (.xls, .xlsx & .txt).
Create a solution (single package) to load these three different format file into
single target SQL server table.

Data I worked on is a simple employeedata

empid,ename,dept
1,steve,20
2,john,20
3,martin,30





感谢您的帮助。



谢谢!!



Appreciate your help.

Thanks!!

推荐答案

如果文件中的所有记录都需要插入单个表格我们可以应用这个场景。



1.创建多个平面文件源[请注意,如果所有文件中都有相同的架构,则可以这样做。) />
2.通过合并组件合并所有源。

3.将其加载到目标OLEDB组件。
If all the records in the file need to be inserted to a single table we can apply this scenario.

1. Create multiple flat file sources [note that this could be possible if you have same schema in all the files].
2. Merge all the sources through merge component.
3. Load it to the destination OLEDB component.


这篇关于如何使用SSIS将数据从多个源(文本和Excel)加载到单个表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆