SSIS导入Excel时记录行号
1. "Excel源"后添加"脚本组件"
2. "脚本组件"中新增输出列,命名为"RowNumber"
3. "脚本组件"中编辑脚本.
4. 脚本如下.
private int m_rowNumber; m_rowNumber++; Row.RowNumber = m_rowNumber;
5. 下一步的输入列中显示RowNumber
6. 结果.
参考链接:
1. https://support.microsoft.com/en-us/help/908460/how-to-add-an-incremental-counter-in-a-sql-server-2005-integration-ser
2. https://www.hansmichiels.com/2015/11/13/how-to-add-a-rownumber-to-a-data-flow-task-in-ssis-2012/
原文地址:https://www.cnblogs.com/yanghaibo/p/10306317.html
时间: 2024-10-09 22:56:34