Hi,
I loaded amount of data into one table.Table name is SAMPLE. Some of the data inserted correctly. Some data is inserted but not correctly.
My SQL Loder commands:
In command promt, I wrote like
Sqlldr userid=scott/tiger@flower control=sample.ctl log=sample.log
Sample Control file: -
LOAD DATA
-
INFILE *
-
INTO TABLE SAMPLE
-
FIELDS TERMINATED BY ","
-
(
-
ID,
-
NAME,
-
STREET
-
)
-
BEGINDATA
-
10,'MICHAEL',JAMKHYA ROAD,89,CROSS STREET,
-
20,'SATHEEH',JKOIYTT STKAJ,12,MAIN ROAD',
-
Data loaded like
ID NAME STREET
10 'MICHAEL' JAMKHYA ROAD
20 'SATHEEH' JKOIYTT STKAJ
But I need full values JAMKHYA ROAD,89,CROSS STREET in street columns.
What I found means, the oracle server accepts street columns values up to first comma.because I mention in control file fields terminated by “’ ”.so that only it writes like this.
How to avoid these errors?
4 1618
As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).
This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.
Please use the tags in future.
MODERATOR.
Hi,
I loaded amount of data into one table.Table name is SAMPLE. Some of the data inserted correctly. Some data is inserted but not correctly.
My SQL Loder commands:
In command promt, I wrote like
Sqlldr userid=scott/tiger@flower control=sample.ctl log=sample.log
Sample Control file: -
LOAD DATA
-
INFILE *
-
INTO TABLE SAMPLE
-
FIELDS TERMINATED BY ","
-
(
-
ID,
-
NAME,
-
STREET
-
)
-
BEGINDATA
-
10,'MICHAEL',JAMKHYA ROAD,89,CROSS STREET,
-
20,'SATHEEH',JKOIYTT STKAJ,12,MAIN ROAD',
-
Data loaded like
ID NAME STREET
10 'MICHAEL' JAMKHYA ROAD
20 'SATHEEH' JKOIYTT STKAJ
But I need full values JAMKHYA ROAD,89,CROSS STREET in street columns.
What I found means, the oracle server accepts street columns values up to first comma.because I mention in control file fields terminated by “’ ”.so that only it writes like this.
How to avoid these errors?
Enclose the data in double quotes as shown below: -
LOAD DATA
-
INFILE *
-
INTO TABLE SAMPLE
-
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
-
(
-
ID,
-
NAME,
-
STREET
-
)
-
BEGINDATA
-
10,"MICHAEL","JAMKHYA ROAD,89,CROSS STREET",
-
20,"SATHEEH","JKOIYTT STKAJ,12,MAIN ROAD",
-
Enclose the data in double quotes as shown below: -
LOAD DATA
-
INFILE *
-
INTO TABLE SAMPLE
-
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
-
(
-
ID,
-
NAME,
-
STREET
-
)
-
BEGINDATA
-
10,"MICHAEL","JAMKHYA ROAD,89,CROSS STREET",
-
20,"SATHEEH","JKOIYTT STKAJ,12,MAIN ROAD",
-
Hi,
I have 200 hundred record..It will take long time .. please tell to other way
Hi,
I have 200 hundred record..It will take long time .. please tell to other way
SQL LOADER allows two methods:
1. Terminated BY Optionally Enclosed BY
2. POSITION (in case if the data is of fixed length, but it is not so in your case)
you need to go with method 1.
If you have a textpad, copy paste the data in it, create a macro to enclose the text with double quotes and use it.
You can also do that with a excel sheet as well
Sign in to post your reply or Sign up for a free account.
Similar topics
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |