Compare excel data with oracle using c# - excel

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.

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

Related

Excel - read data from ODBCbut paste values only

i have an excel document with conditional formatting and data validation lists and lookups.
The users populate this data in Excel.
I then read it into HANA DB and find any new records required to be enriched.
I would like then to be able to refresh the data in Excel with the data i have in HANA however when I go to import via ODBC I then get a table created.
Ideally, it would paste values back into Excel rather than creating a table object as this removed the formatting included originally
Are there ways around this?
Thank you
Create a hidden sheet where you can place your ODBC source table and write a VBA code that will copy and paste new records from ODBC connection to your user-friendly list. You may filter this enriched records via VBA or PowerQuery join or with something like index and match functions.

How can I setup Power BI Report Builder to an Excel Data Connection and retrieve the data from a Table

I am new to Power BI Report Builder and I am trying to setup an Excel spreadsheet as a Data Source. I'm not quite sure on the Connection String, so any help on that would be a great start. But I really don't have a clue how to build a query to specify the data I want from the Data Source. When I try it gives me the error message "The XmlDP query is invalid". I haven't used XmlDP before so I don't know what I should be writing.
In the Excel spreadsheet, I have a table called "Table_Calendar", in Sheet2. I want to pick up all columns in this table and all rows. Please help!

How to create 'dynamic' parameters from an excel table to apply to a oracle query through Power Query

I am trying to add data to a report (an excel table) from an oracle table.
Easy enough to get data and merge - but my problem is I only want the oracle query to pull from the ID's listed in the report (excel table).
Any thoughts on setting up these parameters?
Thank you!

Importing data from excel to multiple tables in Oracle DB

I have an excel sheet with a single workbook with data in it. The data is around 1000 rows and 50 columns. I need to import these data to an Oracle DB every week. Here comes the problem, the columns in the sheet belongs to different tables with some columns go in multiple tables. I use SQL Developer V.18.1.0.095. Thanks in advance for the help.
Note: I created a temp table and copied all data to it, then wrote the query to push each column to its respective tables. But, I feel its complex and think it won't work. Is there any better way.
PL/SQL Developer has special tool for tasks like this, calls ODBC Importer (Menu 'Tools'-> ODBC Importer).
For use it you have to set Excel File in USER / System DSN field and your domain user and password, and push Connect after.
After connection developer will ask you path of excel file, and after you can create table in heiborhood tab for your dataset.
Or, you can use sql loader. Ask google how to. It's easy.

Importing data from Excel into a database

I want to import data from Excel into corresponding tables based on different column data's on based on ID's like customer data on based on CustomerID present in Customer table.
Means we have to extract data from the table and Excel source on basis of ID's.
Could you please help me out on this?
Use the SQL Server Data Import Wizard - see an article on it here.
(source: databasedesign-resource.com)
This wizard allows you to define your Excel file to import, it allows you to define the target where to put the data, it allows you to define mappings between columns in Excel and columns in your SQL table, and much more.
Update: based on your comment to the other answer, if you need to import the Excel sheet and match it up to some pre-existing lookup data, then you should definitely look at the SQL Server Integration Services (SSIS) which are there exactly for this kind of import/lookup scenario.
Your question's gamma is a bit all over the place so not entirely sure what you are asking about but here goes.
You can save you excel spreadsheet as a CSV file and then import that into your database. There a number of tutorials on this if you search google. Try searching "import CSV into database".

Resources