Import Data from TxT to Tables

From: Olsiewicz Mirko <M.Olsiewicz_at_AKAP.DE>
Date: Sat, 21 Jul 2001 21:45:26 GMT
Message-ID: <9evefs$pk1$02$1_at_news.t-online.com>


Hello,

[Quoted] [Quoted] I get some Files from SAP (TXT, ZKS). This Files are all in one Directory. [Quoted] [Quoted] Now I must Import each File in a Table.
I saw a Message abaut IMP, but this Tool is not Usefull to me. I need it in [Quoted] [Quoted] a Procedure. Can you show me this with an Example.

[Quoted] [Quoted] This is what I have found, but it doesn't work

  1 declare f utl_file.file_type;
  2 p varchar2(255);
  3 begin
[Quoted] [Quoted]   4 f:= utl_file.fopen('c:','skost.txt','r'); [Quoted]   5 loop

[Quoted]   6      begin
[Quoted]   7        utl_file.get_line(f, p);

  8 dbms_output.put_line(p);
  9 exception
 10      when no_data_found then
 11         exit;
 12   when utl_file.invalid_operation then
 13                 exit;
 14        when utl_file.invalid_path then
 15          exit;

 16 end;
 17 end loop;
 18 utl_file.fclose(f);
 19* end;
declare f utl_file.file_type;
*
FEHLER in Zeile 1:
ORA-06510: PL/SQL: Unbehandelte benutzerdefinierte Ausnahmebedingung (exception)
[Quoted] [Quoted] ORA-06512: in "SYS.UTL_FILE", Zeile 102
[Quoted] ORA-06512: in "SYS.UTL_FILE", Zeile 255
[Quoted] ORA-06512: in Zeile 7


Thanx Received on Sat Jul 21 2001 - 23:45:26 CEST

Original text of this message