Environment information:
* Oracle version: 9 I
* Operating system: Windows 2003
Good morning
Someone could tell me how I do to say what the delimiter character in the uses of the sqlldr to import data from a txt file to the table in my database?
I am doing as follows
C:> SQLLDR User / PWD Control = 'C: \ file.txt' log = 'C: \ Log_Arquivo. txt 'bad =' c: \ file.bad 'discard =' ??c: \ file.disc '
The delimiter character in my txt file is #
Did anyone know tell me?
SQLLDR
-
- Moderador
- Posts: 2016
- Joined: Wed, 12 Jan 2005 3:25 pm
- Location: Araraquara - SP
Abraço,
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
So I gave a search here in the forum and found this link below:
http://en.glufke.net/oracle/viewtopic.p ... ght=sqlldr
In it there is another link, with documentation Oracle itself on SQL * Loader.
Any questions, just return.
http://en.glufke.net/oracle/viewtopic.p ... ght=sqlldr
In it there is another link, with documentation Oracle itself on SQL * Loader.
Any questions, just return.
-
- Rank: DBA Sênior
- Posts: 365
- Joined: Tue, 24 May 2005 2:24 pm
- Location: Araraquara - SP
Cristiano (Tineks)
Araraquara - SP
Araraquara - SP
In the control file c: \ file.txt you can inform the delimiter .. follows there an example ..
[]'s
.
.
Into Table cotacao
Append
Fields Terminated By '#'
Trailing NullCols
(
NRO_MOEDA
, DAT_INI_VALIDADE date "DD/MM/YYYY"
)
-
- Rank: Programador Júnior
- Posts: 23
- Joined: Fri, 20 Jul 2007 12:49 pm
- Location: São Paulo - SP
I understood ..
Poxa worked
Now tell me one thing
I have a 40 where the records are separated by year / month
Can not I make load of a file at a time?
Do I have to create a files only with everything?
When I do a file and then I try to make another one, it says the table needs to be empty!
Poxa worked
Now tell me one thing
I have a 40 where the records are separated by year / month
Can not I make load of a file at a time?
Do I have to create a files only with everything?
When I do a file and then I try to make another one, it says the table needs to be empty!
-
- Moderador
- Posts: 2016
- Joined: Wed, 12 Jan 2005 3:25 pm
- Location: Araraquara - SP
Abraço,
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
Zenfra,
Take a look at this link below:
[B [url=http://www.orafaq.com/faqloadr.htm]SQL Loader / b].
He has a FAQ, containing the main topics on the tool.
there I saw that can be imported more than one table etc ...
Take a look at this link below:
[B [url=http://www.orafaq.com/faqloadr.htm]SQL Loader / b].
He has a FAQ, containing the main topics on the tool.
there I saw that can be imported more than one table etc ...
-
- Rank: DBA Sênior
- Posts: 365
- Joined: Tue, 24 May 2005 2:24 pm
- Location: Araraquara - SP
Cristiano (Tineks)
Araraquara - SP
Araraquara - SP
Zenfra,
The insert error is appearing because you must be using the INSERT command in your control file. If you are inserting a file at a time you can use the Append command.
[] 's !!
The insert error is appearing because you must be using the INSERT command in your control file. If you are inserting a file at a time you can use the Append command.
[] 's !!
-
- Moderador
- Posts: 2016
- Joined: Wed, 12 Jan 2005 3:25 pm
- Location: Araraquara - SP
Abraço,
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP
Example:
LOAD DATA
INFILE 'mail_orders.txt'
BADFILE 'bad_orders.txt'
APPEND
INTO TABLE mailing_list
FIELDS TERMINATED BY ","
( addr,
city,
state,
zipcode,
mailing_addr "decode(:mailing_addr, null, :addr, :mailing_addr)",
mailing_city "decode(:mailing_city, null, :city, :mailing_city)",
mailing_state
)
Personally, below the link of an article that I published in my blog about SQL Loader, which maybe help to take some doubts:
http://www.fabioprado.net/2010/10/carga ... o-sql.html
]
Fábio Prado
http://www.fabioprado.net/2010/10/carga ... o-sql.html
]
Fábio Prado
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest