I wish to import data from excel into oracle table.
But my requirement is I Have multiple excel files and each file contains multiple sheets.
But all have the same structure.
Please let me know the suitable way to perform the same.
Can UTL_FILE utitlity be used to perform this extraction.
I don't know how to do it directly from Excel.
Actually, I do, but manually, using TOAD's "Import table data" option. I also don't know what technique stands behind the scene, can only guess:
- it is first temporarily saved as CSV and then loaded
- Excel files are XML so TOAD manipulates such a data
How would I automate it?
save each worksheet into its own CSV file
manual job for me as well. Maybe someone - who knows Excel far better - can write a VBA script or something like that. On the other hand, maybe it is possible to use such a script to directly insert data into an Oracle table ... no idea, sorry
write a SQL Loader control file
load file-by-file, reusing the same control file
how to automate that? Use SQL Loader command line DATA parameter.
how to change it dynamically? Create a wrapper script (on MS Windows, that would be a .BAT script) which would - in a loop - iterate over all those CSV files and feed SQL Loader with new data in every iteration
SQL Loader+s advantage over UTL_FILE (you mentioned) is that
it works locally (on your own PC; you have to install it, of course (if you don't have it already). It comes along with any Oracle database (even XE, Express Edition), or is contained in Oracle Client software under its Utilities), while
for UTL_FILE you have to speak to your DBA in order to get access to the directory (usually located on the database server) which would be then used by the named package.
Related
I have dbf files from my client oracle database. Their admin said that is buckup of database. I am trying to opening those files in different editors like open office, excel, dbf manager and others, but it cannot be done because during this action it always says file has incorrect format, or file has incorrect header.
I read a little and it seems that was wrong backup of database or something. I have 7 dbf files and none of them works.
I just want to open those files and make import to csv/excel to export it to new system with sql database
I have a ddl script to create some tables but the data is in .ctl files and I never use it before. I did some researches but I didn't quite understand how to use SQLLDR. How it works? Can I use some other way to execute the .ctl file? I'm just using PL/SQL and Oracle 10G
The way you put it, it would go like this:
using DDL script, create all those tables
if CTL files contain data, I presume it is within the BEGINDATA section. Fine, couldn't be better because - as soon as you run the loader, it'll know where to find data to be loaded (it also means that control file uses infile *, right?)
you have to have access to SQL*Loader
if you can connect to the database server, it is there
if you're using your own PC, see whether it is installed
along with the Client software
or, you might even have a database on your PC (XE?)
once you have it (the sqlldr.exe), make sure its directory is contained with the PATH environment variable, or - if not - invoke it by specifying the whole path to it
open command prompt of your operating system
navigate to directory that contains CTL files
run the loader as
sqlldr scott/tiger control=file1.ctl log=file1.log
If everything is OK, data will be loaded. Check log files!
I have an oracle .dmp file which I would like to open from excel 2007. How do I use the 'get external data' feature to do so? Is it possible in the first place?
It's not possible, no.
Assuming the .dmp file was produced by the Oracle export utility, that is a proprietary, undocumented binary file. Only Oracle's import utility would be able to read it. The import utility can dump the DDL statements for the structure(s) in the dump file to a flat file but if you want to look at the data, you'd need to import that data into an Oracle database.
In a current project I have to generate an Excel report. I do have the the Excel file as a template which contains some static data along with some fields which contain parameter values.
On the bottom of the Excel file there should be a table which contains data from Dataset.
Now I am wondering if there is a way/ tool to generate the rdl file from the Excel file rather than creating it by myself (which would be very cumbersome...)
On the other hand is there a way to link static Excel content into the .rdl file?
You could use the excel spreadsheet as a data source for the report to pull the information in. But then it would need to be accessible from the report manager server if you're planning on deploying the report. So unless the information in the spreadsheet is going to change I think this will likely be more trouble than it is worth.
If it isn't necessary to deploy it to report manager then you could also try embedding the report in the excel file itself and use SSRS to update the dynamic content and you can just leave the static stuff already there. (Of course, depending on the complexity of what you're doing you could also just automate all of the dynamic stuff in Excel VBA code too.) I've personally never done this, but I've found a couple of blog posts detailing how it could possibly be pulled off. I think this is nifty enough I may have to try it if I ever get the chance. You can even use cell values in the spreadsheet and pass them as parameter values to the report.
I've found a post on embedding the report data as an image that refreshes from the report server. On the upside it seems simple to pull off, but the downside is that it is an image and the numbers won't be available to be individually selected only looked at. So it would be best for charts but not your data table.
Then there is this article which shows how to actually import the values into the spread sheet by pulling it in from SSRS in CSV format and using some VBA code to put it into the excel file. It is a more complicated solution but I think its a pretty cool idea, though I dunno how well it will work in practice.
Otherwise, I think you're stuck recreating the static information and formatting from the excel file in your report.
I'm attempting to open some database files used by a legacy application that I know almost nothing about. The databases appear to be in file pairs of a bin and idx, for example: Cust.bin and Cust.idx.
I have never seen this type of database before and wasn't able to find anything useful through Google. I also don't know what language or tool the developer used for this app, but it seems that he used the default generic icon for his published executable. This is it:
Can anyone tell me anything about this application, what type of database it uses and how I might open the database myself?
The program that was using this database was a custom written application by a former consultant.
I never did figure out what type of database he was using, or how to open it properly. But I did manage to extract all the data out of it. I opened the file up in EditPad and found that all records had fixed-length fields. With this knowledge I was able to easily write a small application to parse all the binary data and export everything to .csv
So I was ultimately able to get the data. Woot!