Question : Compare two excel files

Aloha, I have two excel files with about 80 columns. I need to compare the two and create a file or table of those that are different I was thinking of using a merge join? Any ideas on how to best approach this? Both files have similar fields they are duplicate as far as ID is concerned so matches can be done on ID in each file. But I want to show the fields that are different. Mahalo  

Answer : Compare two excel files

just create a SSIS package
add a dataflow task
add two source ,one for each excel file
add two sort transformation ( you need this because , merge join transformation needs that input data be sorted before) for each source
add merge join transformation , use LEFT JOIN and join them by ID.
now you have joined data, if you want to find out different rows, there are these scenarios after this step:
1- add derived column for each excel column after merge join, compare two columns( they are in row data after join exists), and if they are different put it in another field.

this method needs to be configured for each of 80 columns, very tedious work!!!

2- use lookup transformation instead of merge join.
this should configured for each of 80 columns too!!!

3- add a script component transformation. in it, compare two columns of each row, and if data was different create another output for not-match data and fill it.
this one is the best I think, you just create a method for compare two columns, and pass columns data in it. simpler than defining 80 lookups. but a bit programming needed.( if you need this let me know to help you in code)




Random Solutions  
 
programming4us programming4us