Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a set of CSV files in a folder. Some of the columns in all files are same.
I need to merge all the CSV files into one CSV or an Excel using SSIS. The resultant merged csv or excel file must contain all column names.
I am glad to recieve ur help and comments.

File1.CSV
ID        Name       ContactNo
53        Vikas      9874563210


File2.CSV
ID     Name          Designation
23    MyShore    Software Engineer


Output Expected
ID        Name          ContactNo           Designation 
53        Vikas         9874563210
23        MyShore                          Software Engineer
Posted
Updated 24-May-12 11:34am
v2
Comments
RDBurmon 24-May-12 2:32am    
We will be glad if you give us format and data of all CSV files.
vikas kunte 24-May-12 2:56am    
File1.CSV

ID Name ContactNo
53 Vikas 9874563210


File2.CSV

ID Name Designation
23 MyShore Software Engineer


Output Expected

ID Name ContactNo Designation

53 Vikas 9874563210
23 MyShore Software Engineer

1 solution

I hope you are using Sql2005 and above..

Following links will help to create Two flat file sources and you could use a Merge Transformation to combine into a single file

http://www.mssqltips.com/sqlservertip/1322/merge-multiple-data-sources-with-sql-server-integration-services/


http://technet.microsoft.com/en-us/library/cc280522.aspx

http://www.bimonkey.com/2009/07/the-merge-transformation/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900