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 2005 Forums
 SSIS and Import/Export (2005)
 Anti-lookup or similar

Author  Topic 

Tasta
Yak Posting Veteran

60 Posts

Posted - 2009-01-18 : 08:22:28
Hi, everybody !
I'm trying to find most efficient way of transferring data from table A(id) to table B, where id don't exist in table C. Table C is a small table of 10 rows maybe, A - millions of lines. I tried to use lookup and send to the destination table only error rows, but it doesn't work. Do you have any ideas, besides "select except" , because A table is in Oracle DB, and B &C tables - in Sql Server, and I want it work as fast as possible.
Thank you!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 09:10:20
why lookup doent work? can you explain the problem?
Go to Top of Page

Tasta
Yak Posting Veteran

60 Posts

Posted - 2009-01-18 : 10:14:47
Maybe because I'll trying to use only error output, Lookup doesn't see my columns from original table so I can nothing to connect to destination.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 11:40:34
what was the query you gave inside lookup?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 11:42:09
you can also use custom component table difference for this

see below

http://wiki.sqlis.com/default.aspx/SQLISWiki/TableDifference.html
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-01-18 : 15:34:01
Maybe you need to transfer table A from Oracle to Staging table(SQL Server) and do rest of steps.
Go to Top of Page

revelator
Starting Member

32 Posts

Posted - 2009-01-18 : 15:35:07
Can you give a bit more information regarding the lookup itself, and the input columns for it? Are you redirecting the non-matching rows rather than failing the package?



-----------------------------------
Waiting for the Great Leap Forwards
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 23:13:49
refer this
http://www.sqlis.com/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
Go to Top of Page
   

- Advertisement -