Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Loader problem

Re: SQL*Loader problem

From: Forrest Cicogni <fcicogni_at_sageasset.com>
Date: Sun, 2 Dec 2001 21:58:21 -0500
Message-ID: <1007334272.525500@news>


If I understand your question, writing the literal value in for the field position should solve your problem.

FIELDS TERMINATED BY ','
(f1, f2,'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 Sun Dec 02 2001 - 20:58:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US