Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Lookup transformation [Lookup Data Key [95]] Error: Row yielded no match during lookup


Lookup transformation [Lookup Data Key [95]] Error: Row yielded no match during lookup

Author
Message
M_GREAT_4_SQL
M_GREAT_4_SQL
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 100
Hello All,
I am using SSIS to import data from one datasource to another data destination.
I have following scenerio
I have two servers [server1] and [server2]
I have to transfer employee records only on the basis of Departments available in Server2's table(i.e. tbl_Department)

In technical terms
I have to implement following query
SELECT * FROM server1..tbl_EMPLOYEE WHERE DEPARTMENT IN (SELECT DEPARTMENT_Name FROM server2..TBL_DEPARTMENT).

I tried using lookup transformation but got following error
[Lookup Data Key [95]] Error: Row yielded no match during lookup

Please guide me the best way to do this.

Please do help...whatever you can...really appreciate you all. Advance Thank You all.
Erik Kutzler
Erik  Kutzler
SSChasing Mays
SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)SSChasing Mays (639 reputation)

Group: General Forum Members
Points: 639 Visits: 1697
The first question you need to answer is what to do with records that don't have a matching Department in your TBL_DEPARTMENT table. Can you ignore those records, or do you need to report them at some point?

In the Reference Table table of the Lookup Transformation Editor, you should select Use Results of a SQL query and enter "SELECT DEPARTMENT_Name FROM server2..TBL_DEPARTMENT." On the Columns tab, join the DEPARTMENT field of the Available Input Columns to the DEPARTMENT_NAME field of the Available Lookup Columns.

Click on the Configure Error Output button. Go to the Error column of the Lookup Output row. To ignore unmatched records, select Ignore Failure from the drop-down. To enable the ability to redirect the unmatched rows to another output, select Redirect Row.
M_GREAT_4_SQL
M_GREAT_4_SQL
SSC Rookie
SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)SSC Rookie (36 reputation)

Group: General Forum Members
Points: 36 Visits: 100
Its working fine after applying Ignore failure.

Thank you so much for the help.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search