Solved

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

Posted on 2003-11-16
3
1,866 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 47

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 47

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now