How prevent to load the dublicate row in OLEBD destination
Hi All,
i load the data from Staging database to Poststaging but when run package two time at that time i got same rows two time or if i run package three time i got same data three time in poststaging table.
i took OLEDB Souce which extract the data from staging(Database)
i took OLEDB destination whichload the data to Poststaging(Database)
Note both database located in same server.
my question is how i prevent to load dublicate row in to OLEDB destination.
in my many source column contain NULL value and there is no any row which uniquly identify.
my question is i wan to prevent to the same rows in destination.
i dont in this scenario i have to create the store procedure or i have to use the look transpomation.
if i have create the store procedure then where i have to create the SP.
My source table is like
state_code State_Name State_Code State_code_Alpha Boat_Rat_Territory
NULL IL 098 908 0978
786 NJ 909 889 0989
878 MA 090 097 0989
in this scenario i can not create the primary key in destination table.
what is other option.
if i have to create the SP then can you please help me to create the SP
I really appreciate if i get any Help from you
Thank you
Please help me in this scenario.
May 19th, 2011 10:58am
Use composite unique keys to determine what is duplicate. E.g. the combination of
IL+098+908+0978 would become your pseudo-unique key. Then your SQL statement would be
Insert Into ABD where not exists select col1+col2+col3
Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 11:08am
Here are
a few techniques for removing duplicates from your data flow. They may not be appropriate for your situation though.
You may want to use a Lookup component to test if that row already exists in the target table. And yes, you can detect duplicates even with NULLs. If you (as a human) can see that there are duplicates, then you should be able to teach SSIS how
to see them.
Talk to me now on
May 19th, 2011 12:29pm
Use a Sort transform from SSIS is a possible alternation - Sort on certain keys and check "remove duplicate records"
at Sort transform.http://uk.linkedin.com/in/ramjaddu
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 4:41pm