?
Solved

Lookup value from a table based on a column value in an SSIS Flat File Source

Posted on 2008-06-11
4
Medium Priority
?
173 Views
Last Modified: 2010-05-18
I have a CSV file which I read into SSIS using Flat File Source. This CSV doesn't have all the columns required by the destination - I need to get the row values for these columns from other tables based on the row values in the CSV.

I thought you could enter a SELECT statement such as "select id from testtable where testcode = ?" in the expression field in the Derived Column component but this will not parse.

Does anyone know how to do this in SSIS?
0
Comment
Question by:meninga
  • 2
3 Comments
 
LVL 60

Expert Comment

by:chapmandew
ID: 21760723
You'll likely need to use the Lookup tasks in SSIS to do this.
0
 
LVL 8

Accepted Solution

by:
i2mental earned 500 total points
ID: 21760751
It sounds like you just need to do a lookup transformation. You'll need a connection manager pointed to that testtable obviously. Just add the lookup to your data flow and create the join to the testtable on testcode. Add the value you're looking up from the test table as a new column and you're done.

Derived columns use expressions.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 21761845
Why are you closing this?  
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question