第二次执行ssis包时重复插入 [英] Duplicate insertion while excute ssis package 2nd time

查看:176
本文介绍了第二次执行ssis包时重复插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我准备了将记录从excel转移到数据库表的包。数据传输第一次成功从excel到数据库表但第二次执行包时同样的数据插入到表中如何避免使用ssis重复插入。

I have prepare package that transfer record from excel to database table. data transfer successfully first time from excel to database table but while executing package second time same data insert into table how to avoid duplicate insertion using ssis.

推荐答案

嗨Ravi,



如果您使用数据流任务从excel中提取数据并将其插入SQL,那么您需要在源和目标之间使用Lookup组件和条件分割来识别新的记录,并根据一些独特的列值检查记录的存在。



你可以看看这个例子:



http://sqlblog.com/blogs/andy_leonard/ archive / 2011/12-21 / 1631.aspx





您可以参考的另一个链接是:



SSIS:在维度表格中加载数据e通过合并加入 [ ^ ]





如果您需要任何进一步的帮助,请告诉我。< br $>


问候,

Mubin
Hi Ravi,

If you are using Data Flow Task for extracting data from excel and inserting it to SQL, then you need to use Lookup component and conditional split between your source and destination to identify new records and check for existance of records on the bases of some unique column values.

You can take a look on this example:

http://sqlblog.com/blogs/andy_leonard/archive/2011/12/21/1631.aspx


One more link you can refer is:

SSIS: Load Data in Dimension Table by Merge Join[^]


please let me know if you need any further help.

Regards,
Mubin


这篇关于第二次执行ssis包时重复插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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