I have connected the error flow of the lookup transformation to the target. I am acheiving expected results, but is this the best practise? I have not connected to the green arrow to any task.
how to do upserts: http://www.sqljunkies.com/WebLog/ashvinis/archive/2005/06/15/15829.aspx hth
Robin Wesley wrote:
I am checking to see if the source record is available in the target table using a lookup transformation and if not found i have to insert this record.
I have connected the error flow of the lookup transformation to the target. I am acheiving expected results, but is this the best practise? I have not connected to the green arrow to any task.
Thanks Duane. But i am not doing any update all i want to do is, lookup- if no matchfound then insert else ignore. I am worriedmoreso becausei am doing it through the error flow and want to know if there is any better way to do this.
Robin Wesley wrote: | |
|
handling lookup misses: http://blogs.msdn.com/ashvinis/archive/2005/08/04/447859.aspx
hth
Hi, I got this problems when i tried to run package : insert if new and update if exists to separate database (New record and change record) . Both updating records and new record were updated to database (new record ), instead of 1 to change record and 1 to new record . My conditions :
- New records : Isnull (App_ID) != Isnull (Lkp.App_ID)
- Change records : (Is null (App_ID) == Isnull(Lkp.App_ID)) && (Isnull(Customer_name) != Isnull(Lkp.Customer_name) || Isnull(CPC_Center) != Isnull(Lkp.CPC_Center))
Pls help me to slove it .
Many thanks,
Hong