Re: SQL*Loader problem

From: Dmitry E. Loginov <dmitry_loginov_at_mtu.ru>
Date: Mon, 3 Dec 2001 23:02:21 +0300
Message-ID: <9ugm3l$nhn$2_at_gavrilo.mtu.ru>


Try following control-file

LOAD DATA
 INFILE 'data.txt'
 append
 INTO TABLE mytable
 FIELDS TERMINATED BY ','
 (f1, f2, f3 constant 'xxx')
"OraUser" <ora_at_fsgw.ipodion.at> wrote in message news:utwO7.1198376$PV1.24028184_at_news.chello.at...
> I have following problem:
> I need to import data from ascii into my ora-DB
>
> e.g.
>
> ascii-file contains:
> bla1, foo1
> bla2, foo2
>
> the above should go into table mytable with three colums: f1,f2,f3
>
> f1 should be filled with column1 of the ascii file,
> f2 with column2 and
> f3 with some fix value "xxx"
>
> so at the end the table should look like this:
>
> f1 f2 f3
> ----- ----- -----
> bla1 foo1 xxx
> bla2 foo2 xxx
>
> I know how to import the values correctly for f1 and f2, but no luck with
> f3 so far.
>
> my simple control file looks like this:
>
> LOAD DATA
> INFILE 'data.txt'
> append
> INTO TABLE mytable
> FIELDS TERMINATED BY ','
> (f1,
> f2)
>
> any ideas how the syntax is for adding a fix value for "f3" in here?
>
> I checked the case studies of sql*loader in the oracle docs but must have
> overlooked something. I am pretty sure that must be possible with
> sql*loader.. no?
>
> Thanks in advance,
> --franz
>
Received on Mon Dec 03 2001 - 21:02:21 CET

Original text of this message