Multiple table lookup

  • Here is my senerio.  I am trying to take 3 datasources to populate a destination.  1 of the sources is the main table, the other 2 tables are reference tables.  Does anyone know how to use the lookup to lookup values from more than 1 table?

     

    thanks in advance,

    Rob

  • You can right a sql statement the uses the two tables or use two lookup tasks.

  • My preferred method is to import all data sources into staging tables, perform any data modifications that need to be made, and then populate the final tables with the data. I try to use T-SQL as much as possible.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • You can do the first lookup and pass thru all columns then do the second lookup. This will cause all lookup to occur in the pipeline in lieu of SQL. When you set up the source for the lookup, use a sql command with only the columns you need rather then a table/view.

    [font="Comic Sans MS"]Ira Warren Whiteside[/font]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply