在SSIS中插入新记录之前,如何清空目标表? [英] How to empty my destination table before inserting new records in SSIS?

查看:101
本文介绍了在SSIS中插入新记录之前,如何清空目标表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用SSIS生成和转换新数据,以供以后在新系统中使用。每次运行SSIS程序包时,我都会遇到问题,它会不断向我的目标表中插入新记录。

I use SSIS to generate and transform new data for later use in a new system. I have a problem every time I run my SSIS Package, it keeps inserting new records to my destination tables.

如何先清空目标表(/ OLE DB目标),然后插入新生成的记录?

How can I empty my destination table (/OLE DB Destination) first and then inserting the newly generated records?

当前,此问题的解决方法是在运行程序包之前从DestTable中删除

Currently the workaround for this problem is performing a delete from DestTable before running my package.

推荐答案

将您的delete语句放入 Execute SQL Task 中。然后使其成为流程的第一部分。该组件看起来像这样:

Put your delete statement in an Execute SQL Task. Then make it the first component of your flow. The component looks something like this:

这篇关于在SSIS中插入新记录之前,如何清空目标表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆