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: importing the text files

Re: importing the text files

From: Hexathioorthooxalate <ruler_at_removemetoemail.clara.co.uk>
Date: Sat, 29 Jan 2005 16:49:22 -0000
Message-ID: <1107017349.878.0@ersa.uk.clara.net>


As has been correctly pointed out, sqlldr is a separate utility and the control file code you have written is not intended to be typed in at an SQL prompt. However, and you did not specify the Oracle version you were using, you might also want to follow this up instead. From 9i much of the sqlldr control file syntax is preserved in something you can type in at the SQL prompt in a feature commonly known as "External Tables". A good starting point/overview for reading is here:

http://www.oracle.com/technology//products/oracle9i/daily/may24.html

Regards
Hex



Disclaimer:
If I am posting a question in a newsgroup:

   Please don't bother to reply with RTFM, this is trivial,    this is a waste of bandwidth, redesign your problem and    I might help you, this was posted last week etc. I    don't find this helpful and it also leads others    reading the current newsgroup thread to believe my    post has been answered when it has not. If what I am    saying is trivial etc, if possible please provide a URL    for others with similar problems to follow, or alternatively    if relevant give a code or pseudocode example. Remember    an expert was once too a novice, I am posting for help    because perhaps this isn't my field of expertise, or    maybe it even is and I things have become clouded, or    maybe I even need help from someone with greater knowledge.

If I am replying to an existing post in a newsgroup:

   Please note the posting is provided in good faith    by an IT professional in his own time from home. I have    good general knowledge of various technologies and    considerable expertise in others. Assistance given is    my personal view and any technical implementation relates    to my interpretation, expertise, and the current discussion    thread. My opinions are my own and do not reflect on any    employer or inside knowledge of a specific organisation. Any    information provided is provided "as is" with no warranty    implied nor liability accepted.

I will not respond to flaming, unnecessarily terse, or ad hominen attacks. If possible please direct all questions in the newsgroup for others to benefit. In the event you wish to contact me privately and directly, remove the obvious part from my e-mail address. In the event I choose to disclose my "real name" to you (other than my nom de plume "Hexathioorthooxalate"), please treat this information as confidential and unless explicitly authorised in writing, not disclose this information to others.

"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:stomv05rlnrrgvmlmehaihvarpknbqg0tm_at_4ax.com...
> On Sat, 29 Jan 2005 08:49:43 GMT, "rajasekhar via OracleMonster.com"
> <forum_at_OracleMonster.com> wrote:
>
>>hello sir,
>>u gave the option of sqlloader for importing text files.so i have gone
>>thru the manuals of sqlloader and obtained the following code and i typed
>>the following code at sql prompt
>>
>>load data
>>infile 'example.dat' "str '|\n'"
>>into table example
>>fields terminated by ',' optionally enclosed by '"'
>>(col1 char(5),
>> col2 char(7))
>>
>>it is giving an error
>>invalid sql statement load
>>
>>so please give me the response at the earliest possible.
>>
>>thanking you.
>
>
> sqlloader is a separate utility.
> You need to save the code above as a separate file with the extention
> .ctl
> and fire up sql*loader in a dos box
> using
> sqlldr username/password_at_database control=<file above> data=<name of
> your input file> log=<any file>
>
> If you did read the Utilities Manual, I would suggest re-reading it.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
Received on Sat Jan 29 2005 - 10:49:22 CST

Original text of this message

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