SSIS任务用于插入或更新行(SSIS Task to insert or update a row)
当我从数据源获取一些行时,我应该使用哪种SSIS任务,然后在目标中插入新行或更新目标中的行,以防它存在。
我正在考虑使用SQL任务获取结果集中的行,然后使用for循环容器。 但我不知道如何继续下去。
Which kind of SSIS task should I use when I got some rows from a data source, then insert new row in destination or update the row in destination in case it exists.
I was thinking to use a SQL task for getting rows in a result set then use a for loop container. But I don't know how to continue further on.
最满意答案
您可以使用查找任务 :
在匹配时,您通过OLE DB命令执行UPDATE语句 如果出错,则通过OLE DB目标任务在目标中添加行You can use Lookup task:
on match you execute an UPDATE statement via OLE DB command on error you add row in destination via OLE DB destination task更多推荐
发布评论