Re: Import Text Data using Forms/PLSQL???
From: Paul Bruggeman <pbruggeman_at_pve.agro.nl>
Date: Thu, 2 Sep 1999 10:29:16 +0200
Message-ID: <37ce35be_at_wau.nl>
end; Received on Thu Sep 02 1999 - 10:29:16 CEST
Date: Thu, 2 Sep 1999 10:29:16 +0200
Message-ID: <37ce35be_at_wau.nl>
Han Thomas heeft geschreven in bericht <37cf2ad1.86629726_at_Oracle8>...
>Hello,
>
>How does one import a datafile in text (csv) format into an Oracle table
>automatically using a Forms 5 application?
>
>Up to now I've been reading it with Access and then using ODBC, but surely
>there's a better way..
>
>Cheers,
>Han.
>
>+----------------------------------------------------------+
>| Han Thomas 30/1 Ton Kham Road, Tha Sala |
>| Han_at_Royal.net Muang Chiang Mai 50000 THAILAND |
>| www.afmgroup.com/han tel 053-308958 fax 249854 |
>+----------------------------------------------------------+
Hi Han,
You can use the text_io package.
example:
declare
in_file text_io.file_type;
pl_line varchar2(80);
begin
in_file := text_io.fopen(<filename>, 'r') /* 'r' = read, 'w' = write
*/
text_io.get_line(in_file, pl_line)
loop
.
.
.
text_io.get_line(in_file, pl_line)
end loop
exception
when no_data_found
then
text_io.fclose(in_file);
end; Received on Thu Sep 02 1999 - 10:29:16 CEST
