intensive as it executes for every row of data coming through it. Over small
data sets this is fine but larger ones can cause issues. Glad you sorted
> Thanks for your reply.
> This solution is alittle more complicated than I need. I finally
> managed to
> use the OLE command to delete the rows before the insert.
> Thanks.
> "Allan Mitchell" wrote:
>
>> Hello Amiram,
>>
>> This is certainly possible but you will need to be careful around
>> constraints and data integrity.
>>
>> I personally would use the MERGE JOIN transform to do the data
>> correlation
>> (LEFT OUTER JOIN)
>> I would then use a conditional split to decide what I wanted to do
>> with the
>> rows of data that came from here.
>> Say I return the key column from the right hand side of the LEFT
>> OUTER JOIN if there is no match then it will come back as NULL so in
>> the conditional split I can test for this
>>
>> ISNULL([KeyCol])
>>
>> I would then throw these rows in to a staging table and after the
>> data flow task I would use a set based DELETE followed by an INSERT.
>>
>> Make sense?
>>
>> --
>>
>> Allan Mitchell
>>
http://wiki.sqlis.com |
http://www.sqlis.com |
http://www.sqldts.com >> |
>>
http://www.konesans.com >>> I have to identical tables in two different servers. I want to
>>> insert
>>> the
>>> rows from server A to server B, where these rows doesn't exist in B.
>>> For those who exist in B, I want to delete them from B before the
>>> insert and
>>> then insert them too.
>>> I managed to insert the rows but not to delete the rows that exist,
>>> which
>>> raise an error if there are similar keys.
>>> I saw some very compilcated solutions to the problem, and I'm sure
>>> there is
>>> a simple solution. Anyone knows?
>>> Thanks