我在 SSIS 的一个文件夹中只有几个 excel 源文件。我想从这些 Excel 文件中提取数据并加载到 SQL 表中。
我的问题是我想一一保存所有文件名,并想创建与文件名完全相同的 SQL 表
然后要加载相应表中的每个Excel文件。
请帮助我如何为此创建一个包。
Jayvee呈现的高层次视野已经足够好了!让我补充一点细节。
我假设您有动态 Excel 文件连接。
Declare a variable and named it as FileName. And assign it the first file name which is available in the folder.
Place Foreach Loop Container and double click on it. Specify the Folder: and Files: as shown in image below.
In the same Foreach Loop Editor, go to Variable Mappings. Select Variable from drop down list. This is the same variable which we defined in first step. Set its Index to 0. Click OK.
剩下的任务与 Jayvee 解释的相同。
See this http://the-simple-programmer.blogspot.com/2010/02/use-variable-as-table-name-in-ssis.html链接以获取进一步帮助。而这对于结果集属性设置不正确 http://suneethasdiary.wordpress.com/tag/resultset-property-not-set-correctly/。我认为设置结果集财产给单排会做这项工作。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)