Importing data from excel to multiple tables in Oracle DB - excel

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.

Related

how to export data from excel table into access table which is not the same as excel table?

How to export data from excel table into access table which is not the same as excel table, ie some data is same, some is different, I want to auto extract only certain data?
DETAILS
I have over 5000 students and researchers in my Access database and they are unique to employee/student number. I need to maintain training records however I do not get training records sent to me for whatever reason. But HR does and their Excel database is auto-updated with this information.
The Excel HR database and my Access H&S database both use Emp/Student # as identifiers and our training columns are the exact same BUT they are not entirely the same (ie. they have some columns that I don't have and Viceversa).
I spent the holidays updating my database with their training info so that AT THIS MOMENT they are the same. But come the next pay period they will have an auto update of training and I will NOT. Therefore I want to figure out a way to auto-update my DB with theirs... Would love any help you can offer. I know I know they answer may be staring me in the face but I am new to access and I am asking for help. Thanks in advance!
Japes
You can link to your Excel spreadsheet from Access or import it into a new table in Access. Then create a new query that links your Excel table to the Access by the identifier field(s). Set the query to be an Update query and then select the fields in the Excel table that you want to update the Access table with. I would suggest that you make a backup of the Access data before actually running the update query.
Not sure if I'm saying the same thing that #jhTuppeny is saying, but LINK the Excel table into your Access database. Call that the "rawdata" table or whatever you want to call it.
Use this "rawdata" table as the basis for a query in access that will either append/update your Access table. In this query, you can also automate the data for fields that the rawdata doesn't have, or fill it in with DUMMY values that you can manually update in your updated table.

EXCEL: This file has more than xxxx records

I am trying to open a file that i exported from TOAD which has 1.4 million records. It has 4 columns.
I tried opening the file in notepad++, deleting half records there and copying them into other file and saving them. But when i open the 2 files in excel, all the columns are combined as one column.
Could someone give me a solution on how to divide the 1.4million records excel file into 2 files without messing up the columns or data.
If you are married to Excel, skip Toad completely and bring the data in directly with MS Query.
If this isn't SQL Server, you will need to set up an ODBC connection, and from there you can bind the query to the spreadsheet as follows:
From the "Data" tab, select "From Other Sources"
Pick SQL Server if it's SQL Server or MS Query if it's anything else
Skip all of the menus and paste in your SQL once you get to MS Query
Close MS Query, and your live query (and its results) will be dynamically linked to an Excel table (aka ListObject)
The great thing about this is when you want to refresh the query, right-click and refresh. Done.
Better still, you can set up the ODBC connection for your boss and he can do it himself.
Oh, and if you want this split into two datasets, change your SQL to pull the first half and the second half and have them each in a different worksheet. How you do this depends on your DBMS, which I'd encourage you to tag in your question.

Has anyone achieved to use ODBC connection from Excel file into Powerpivot?

I have installed Powerpivot for Excel 2010. I don't have Access 2010 so I thought could I arrange the data in the similar manner as I would for a database.
I'm wanting to query an excel file that has rows of self-generated data into Powerpivot in order to perform simple pivot table. In a sense attempt to get an overview of information about a data set.
At the moment, I'm unable to get set up correctly the ODBC I'm hoping I need to accept an Excel file and to get PowerPivot to accept a database from an Excel file.
Edit: I come to understand that I need to set up a table correctly in Excel so that the ODBC works correctly. Does the picture I provided be right manner to set up a table or any other manner?
Has anyone attempted to do this and if so what would the steps be?
Thanks,
Peter.
Peter, I am working on the basis that your data is in a recognizable table on a worksheet (and that you are not interested in using the standard Excel import method through 'From Other Sources')
If you create the connection to the Excel file in a very particular way it is possible to then query it as if it were a database.
Create a Connection to the spreadsheet in question in Excel through Data>Connections>Add.
In the PowerPivot window on the Design tab click on existing connections and find the connection you just created. Select the connection and Open.
You need to name the connection and then you will be offered the normal import options. Select the sheet you want to get the table from (its actually not important which one you choose at this point).
Once the table has been imported you can re-enter the setup through the 'table properties' on the design tab and you will now be able to 'Switch to' the query editor at which point you can not only write SQL to query your DB but reference any other .xlsx you like.
Jacob
the easiest way is to use a linked table from the excel sheet which has the data - is there any reason why you have not considered this as an option?

Import additional excel data into Access Table

We need to upload a small amount of additional records to a table from an Excel sheet. Is there a way to use the Access Import function to add the additional data to the table (truncate it). The table was created by uploading the same Excel sheet. But now, when records are added, we need to add them to the table. The tables are linked to SQL but I do not want to use an SSIS because there are only a few records and there must be a way to use Access functions. Suggestions please.
It may be easiest to link the excel sheet and run an append query to add data from Excel to existing table. Once linked, this can be done in the query design window.
You did not specify versions of Excel or Access.
I did this with a test 2003 Excel sheet with cells containing 1000+ characters. An import in Access 2003 detects the data type as a memo field, which is correct, when there are that many characters, so it should work for you. It may be your Excel data has other ingredients causing an import issue. How is the excel data derived?
Have you tried importing to Access? It should work fine. If your ultimate target is another database why use Access as an intermediary?
I agree a linked table seems like a really simple method to update a table if you are using Access, but that is your choice.

Creating a table in Excel

I was working on project for my company. The requirements are to create an excel report at the end.
The way I am currently coding/thinking.
Remote Server ---> Local Access table --> give user a UI to filter data however they want --> Export to excel.
However, one of my analysts asked me if we can stay away from access and use Excel only. So I was wondering, is there a way to create a "table" like access table in Excel? This way, when I import data from remote server, I can put it in a table (IN EXCEL), create a form for UI, and have everything contained in one file.
I can't paste the raw data into a sheet because of performance issues (however, I have not tried it. I just assume that it is a lot faster to query a 'real' table then to search through excel cells).
Can you think of a alternate solution?
One option is to use Microsoft Query to directly access the remote database. In this case, the users would need to use the UI of MS Query (which isn't the prettiest) for filtering, but it would get the job done without needing the intermediate database.
Here is a good reference from the Microsoft site.

Resources