SSIS - Updating a table with a OLE DB Command

牧云@^-^@ 提交于 2019-11-28 13:57:50

The update in your SQL Command Task needs to look like this:

update Table A
set
col1 = ?
col2 = ?
WHERE SomeColumn = ?

Where "SomeColumn" is a column that uniquely identifies the row, and you'll need to have the value of "SomeColumn" in your dataflow so that you can map it to the third parameter in the SQL Command.

If necessary (judging from your original update), you can map multiple columns from the dataflow, in fact you can just use the original query in the SQL Command:

update A
set
col1 = ?
col2 = ?
where
? = value 1 and
? = value2 and
? = value 3;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!