Re: Import Data from TxT to Tables

From: Olsiewicz Mirko <M.Olsiewicz_at_AKAP.DE>
Date: Sat, 21 Jul 2001 21:45:30 GMT
Message-ID: <9evl1i$t0o$04$1_at_news.t-online.com>


[Quoted] [Quoted] How can I implement the SQL Loader in my Prcedure? It Works in an CMD Window [Quoted] [Quoted] but when I Type the follwing Text into SQL Plus the Compile say [Quoted] 'Unbekannter Befehl'

[Quoted] [Quoted] " sqlldr username/passwort_at_SID control=Controlfile"

[Quoted] [Quoted] It is very simple, I think. But I don't know how.

Can you help me?

Thanx

"Sydney Palmer" <sydpalm_at_home.com> schrieb im Newsbeitrag news:3B134EC9.30D7_at_home.com...
> Olsiewicz Mirko wrote:
> >
> > Hello,
> >
> > I get some Files from SAP (TXT, ZKS). This Files are all in one
 Directory.
> > 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
> > a Procedure. Can you show me this with an Example.
> >
> > This is what I have found, but it doesn't work
> >
> > 1 declare f utl_file.file_type;
> > 2 p varchar2(255);
> > 3 begin
> > 4 f:= utl_file.fopen('c:','skost.txt','r');
> > 5 loop
> > 6 begin
> > 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)
> > ORA-06512: in "SYS.UTL_FILE", Zeile 102
> > ORA-06512: in "SYS.UTL_FILE", Zeile 255
> > ORA-06512: in Zeile 7
> >
> > Thanx

>

> Why not use the SQL*Loader utility, which can handle
> quite a few input text-file format configurations?
>

> Yours,

>
> Geoff Houck
Received on Sat Jul 21 2001 - 23:45:30 CEST

Original text of this message