Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem in Loading data for clob column using sql ldr

515746Aug 7 2009 — edited Aug 7 2009
Hi,

I am having problem in loading data for tables having clob column.


Could anyone help me in correcting the below script for ctrl file inorder to load the data which is in mentioned format.

Any help really appreciated.
Table Script
------------

Create table samp
(
no number,
col1 clob,
col2 clob
);


Ctrl File
---------
options (skip =1)
load data
infile 'c:\1.csv' 
Replace into table samp
fields terminated by "," 
trailing nullcols
(
no,
col1 Char(100000000) ,
col2 Char(100000000) enclosed by '"' and '"'
)

Data File(1.csv)
----------------
1,asdf,"assasadsdsdsd""sfasdfadf""sdsdsa,ssfsf"
2,sfjass,"dksadk,kd,ss""dfdfjkdjfdk""sasfjaslaljs"


Error Encountered
-----------------
ORA-01461: can bind a LONG value only for insert into a LONG column


Table samp
Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2009
Added on Aug 7 2009
3 comments
744 views