top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to import data from file into database?

+2 votes
50 views
How to import data from file into database?
posted Sep 15, 2014 by Arun Gowda

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

create or replace procedure proc2 is
vfileID utl_file.file_type;
vstring varchar2(100);
vcode varchar2(10);
vname varchar2(10);
begin
vfileID:=utl_file.fopen('D:\','pra1.DAT','R');
loop
utl_file.Get_line(vfileID,vstring);
vcode :=substr (vstring,1,2);
vname :=substr(vstring,4);
insert into hari(code,name)
values(vcode,vname);
commit;
end loop;
EXCEPTION
when NO_DATA_FOUND then
utl_file.fclose(vfileID);
end;

answer Sep 15, 2014 by Suchithra
Similar Questions
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...