Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 SSIS Package

Author  Topic 

avlakshmi77
Starting Member

15 Posts

Posted - 2011-10-05 : 02:57:18
Hi
I want to insert the customer data from source to destination at a regular intervals of time.
here i want to insert only the pending data.
Ex: My customer table having 10 records
for the first time the SSIS package execution will insert the 10 records into destination.
after 2 days customer table is having 15 records. If i execute the SSIS package it need to insert only the 5 records (pending records) to the destination.

For this i used left outer join transformation control to compare the source and destination. and then insert into the destination table.
It is working fine.

My question is
can we achieve this with LookUp Tranformation.?
Is there any performance issue while using left outer join transformation?







visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-05 : 03:06:48
yep..you can
see

http://www.sqlis.com/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx

performance wise lookup wont gain you much in case of large datasets

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

avlakshmi77
Starting Member

15 Posts

Posted - 2011-10-18 : 00:57:49
Hi

While migrating the data.
In some cases i have to update the destination data. comparing with the source data.
For example i have a stock table contains columns(Material Name,Qty) it will maintain the currect stock.
First time insert the whole data into destination table.
From the next time onwards only the updated Qty need to update and if there is any new materials present those need to update in the destination table.

In this cases need to update the data or delete and insert the data which one is best.

can u please guide me in which way i have to follow to solve this condition( with controls also).

Thanks in advance.



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-18 : 02:00:51
it should update and insert
existing Material Name and diffrent qty means update destination table
Non existing Material Name means insertion in destination table.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

avlakshmi77
Starting Member

15 Posts

Posted - 2011-10-19 : 05:07:44
Can you please tell me the SSIS components used for this criteria.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-19 : 05:50:47
oledn command (update) and oledb destination (insert)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

DeepakD
Starting Member

5 Posts

Posted - 2011-10-28 : 08:30:39
Hi,

In SSIS we have the component SCD(Slowly changing dimension)which will suits for your requirement.

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-10-28 : 08:40:29
quote:
Originally posted by DeepakD

Hi,

In SSIS we have the component SCD(Slowly changing dimension)which will suits for your requirement.




but problem it would perform poorly if your tables are sufficiently large

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -