Solved

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

Posted on 2008-06-11
4
163 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
4 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 125 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQl server restarts itself 6 41
How to simplify my SQL statement? 14 55
What is wrong with the below insert statement. Getting error when executing. 5 45
Sql Server group by 10 44
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

839 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