March 3, 2009 at 9:50 am
Hi there,
I wanna develop SSIS package that simulates the below scenario.
In one excel file I have single column 'Name'.
Name
-----
ABC
PQR
BCD
MNO
PAN
I want to retrieve another column data from SQL server for which where condition will have to match with data in Excel file.
SQL Server Table:
----------------------------
ID Name Address Phone
1 ABC XXXXX 12345
2 PQR XXXXX 12345
3 BCD XXXXX 12345
4 LMN XXXXX 12345
5 PAN XXXXX 12345
6 MNO XXXXX 12345
Now I want to retrieve address of each and write in another excel file.
O/p should be like in another Excel File:
Name Address
ABC XXXXX
PQR XXXXX
BCD XXXXX
MNO XXXXX
PAN XXXXX
Also sequence of data should be same as given in first file.
Can anyone help me on this?
:rolleyes:
March 4, 2009 at 7:10 am
Sounds like you could do it in 1 dataflow task this way:
2. An Excel Source that queries that returns a sorted list from the source Excel file
3. A lookup component that uses the SQL Server Connection with the Lookup column to be NAME and select as many columns as you need from the lookup query. You need to be careful here because the SSIS lookup component is case and length sensitive so you may need to use the Advanced tab of the lookup configuration and Enable Memory Restriction. You may also need to use the Modify SQL Statement which will cause the SQL Server to be queried for each row instead of caching the results of the lookup query in memory.
4. An Excel destination using your Excel Destination Component.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 11, 2009 at 5:27 am
Thanks a lot..!!!
:rolleyes:
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply