SSIS任务用于插入或更新行(SSIS Task to insert or update a row)

编程入门 行业动态 更新时间:2024-10-17 13:28:19
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

更多推荐

本文发布于:2023-07-07 21:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1068474.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Task   SSIS   insert   row   update

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!