Solved

using Oracle Forms 6i to load excel file into oracle table

Posted on 2003-11-16
3
1,957 Views
Last Modified: 2007-12-19
I need an example on how to load excel file into Oracle table in Oracle Forms
0
Comment
Question by:ipesin
  • 2
3 Comments
 
LVL 48

Expert Comment

by:schwertner
ID: 9762610
SQL> create directory MYDIR as 'C:\MYIMAGE';

Directory created.

SQL> create table special(a number, b varchar2(20), c blob);

Table created.

SQL>
SQL> insert into special values(1,'abcd',empty_blob());

1 row created.

SQL>
SQL> commit;

Commit complete.


create or replace procedure load(id number)
is
dest_lob blob;
src_lob bfile:=bfilename('MYDIR','file.bmp');
amt integer:=sys.dbms_lob.getlength(src_lob);
begin
select c into dest_lob from special
where a=id for update;
dbms_lob.fileopen(src_lob);
dbms_lob.loadfromfile(dest_lob,src_lob,amt);
dbms_lob.fileclose(Src_lob);
commit;
end;
/

SQL> @ blob_insert

Procedure created.

SQL> exec load(1);

PL/SQL procedure successfully completed.

SQL> select a from special;

       A
----------
       1
0
 

Author Comment

by:ipesin
ID: 9763395
Probably I didn't state my question correctly.... I need to load data from excel file into oracle table referencing directly to excel spreadsheet. I don;t want to use blob. How can I reference to each individual cell? For example,
I need to read file that has 4 columns - and I need to open this file and read each row and identify each cell within this row....
0
 
LVL 48

Accepted Solution

by:
schwertner earned 250 total points
ID: 9763431
You can use the built-in "win_api_dialog.open_file" which will show you the open dialog box from which you can open any file required.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Oracle - SQL Query with Function 3 66
Read XML values 8 56
Oracle create type table from existing table%rowtype ? 6 63
Toad 12.10 Enterprise visual interface 4 33
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to recover a database from a user managed backup

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question