-2

Can any one please advice what is the best way to compare excel data with data in Oracle and return matching information using c#?

I can create a temp table in oracle database, upload excel data to table and run query to compare data in temp table with actual table and get data.

But let me know if it can be done in any other way.

Ex: I have excel data with vehicle numbers and Oracle has details of vehicles, owner name & address. I want to get all the information which match vehicle numbers in excel.

please let me know best to do this. It would be great if you can provide sample code.

Thanks in Advance.

IC123456
  • 41
  • 1
  • 7
  • 1
    It can obviously be done in lots of ways. You could also extract all of the data from both the Excel file and SELECT all of the relevant data from the Oracle database and compare it inside your application. Go and try your suggested approach and see if it fits your requirements and if not then come back and ask a new question to ask how to improve your design. – ydaetskcoR Sep 19 '14 at 07:14

1 Answers1

0

You Can do it with fetching excel data in C# code and fetch the data from select query from oracle database and then try to compare it in C# using datatables. You can refere to one of the stackoverflow link Compare Datatables.

and to insert excel data in datatable in C# refer to below linkFetch Excel Data in Datatable

For inserting data from excel to C# Application you have to connect through OLEDB and then fetch the records

Community
  • 1
  • 1
Ameya Deshpande
  • 3,580
  • 4
  • 30
  • 46