---看了贾涛的图解SSIS批量导入Excel文件
贾涛blog :http://blog.csdn.net/jinjazz/archive/2008/07/25/2710169.aspx
依葫芦画瓢做了个批量 导入txt文件
1
先建立txt文件
2 在
SQL Server Business Intelligence Development Studio or vs 2005 中
建立 integration server 项目
并且在控制流里面拖入 foreach
3
右击foreach 在表达式(expressions)选择文件枚举器
4
在变量映射中添加变量 txt 属性为 myfilenamefull 不同于xls myfile (但变量名无所谓)
5
把数据流任务拖入到foreach 容器里面
6
右击数据流编辑 或选中数据流 点数据流任务
把平面文件源拖入到数据流任务
7
编辑选中
8导入到oledb目标源
9在连接管理器 testtxt expression 用 变量来代替 不同于xls 中属性xlsfilepath选择connectionstring
属性的变量用先前建立好的 txtfilenamefull代替
10
11
txt管理器会有提示错误所以 把数据流属性中 delayvalidation 设置为 true 也不需要
完成 over