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

Home -> Community -> Usenet -> c.d.o.server -> Re: SQLLDR control file syntax

Re: SQLLDR control file syntax

From: Hexathioorthooxalate <ruler_at_removethisparttoreply.clara.co.uk>
Date: Wed, 19 Nov 2003 15:56:14 -0000
Message-Id: <1069257374.10548.0@doris.uk.clara.net>


Close but no cigar!

Insert the word CONSTANT just before "c:m.lst" and try again.

Hexathioorthooxalate

"barry" <bbulsara23_at_hotmail.com> wrote in message news:747f1dec.0311190717.50583982_at_posting.google.com...
> Sorry for a syntax question - I've hit my head against a wall all
> morning and all of yesterday and have little to show for it. Needless
> to say I cannot find the necessary info in the on-line Oracle docs.
>
> My problem - I have a file called "C:\bb23\file.txt" that is
> periodically created. This file has one line of text in it. I also
> have a file called "C:\M.LST"
>
>
> CREATE TABLE tblTest(id VARCHAR2(10),logfile CLOB);
>
>
> I want to load into my table tblTest the one line /*content*/ of
> file.txt into column "id", and the entire file content of "m.lst" as a
> clob into column "logfile".
>
> Here is my control file (that doesn't work, SQLLDR not unsurprisingly
> doesn't like the "c:\m.lst"). Doesn't like means "SQL*Loader-416: SDF
> clause for field "FTPLOGFILE" in table TBLFALFTPLOG references a non
> existent field.". I understand the error but can't get the syntax
> right to resolve the problem.
>
>
> OPTIONS (ERRORS=500000)
> LOAD DATA
> INFILE 'C:\bb23\file.txt'
> INTO TABLE tblTest
> REPLACE
> FIELDS TERMINATED BY ','
> ( id,
> "LOGFILE" LOBFILE ("c:\m.lst") TERMINATED BY EOF
> )
>
>
> To over-explain : if the file "file.txt" has one line of text in it
> and that line content is "2233933-1", and the file "m.lst" has the
> following in it "Log Start: 19/11/2003 13:16:54 blah blah Log
> Terminated: 19/11/2003 15:09:12", then new table row populated into
> the database would be:
>
> id="2233933-1"
> logfile="Log start 19/11/2003 13:16:54 blah ...."
>
> I am running Oracle 8.1.7.0.0 under WindowsNT.
>
> Any help on the correct syntax for my control file would be most
> appreciated. Thank you in advance
> Barry
Received on Wed Nov 19 2003 - 09:56:14 CST

Original text of this message

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