Home » RDBMS Server » Server Utilities » Load LOB data !!
Load LOB data !! [message #172066] Sun, 14 May 2006 04:08 Go to next message
AlinaC
Messages: 45
Registered: November 2005
Location: India
Member

Hi,
I need some help. I am trying to load a text document in to a table. I have to load from a single file as I have generated the datafile from Sybase database using bcp out utility.

Structure of my table is as follows.

LOB_ID VARCHAR2(1)
MY_LOB CLOB

Using the following .ctl file I have tried to load data , but failed.

LOAD DATA
INFILE 'D:\db\data\lob_data' "str '&~&'"
BADFILE 'lob.bad'
DISCARDFILE 'lob.dsc'
APPEND
INTO TABLE lob_test
FIELDS TERMINATED BY '~~~' OPTIONALLY ENCLOSED BY '&~&'
TRAILING NULLCOLS
(
LOB_ID ,
MY_LOB
)

Lobs are not of same size for each recor. Please put input so that I can modify the .ctl file

Regards,
Alina
Re: Load LOB data !! [message #172079 is a reply to message #172066] Sun, 14 May 2006 09:24 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
What's the largest that you expect your LOB data to be?

You can try the following control file:

LOAD DATA
INFILE 'D:\db\data\lob_data'
BADFILE 'lob.bad'
DISCARDFILE 'lob.dsc'
APPEND
INTO TABLE lob_test
FIELDS TERMINATED BY '~~~' OPTIONALLY ENCLOSED BY '&~&'
TRAILING NULLCOLS
(
LOB_ID ,
MY_LOB  char(10000)
)
Previous Topic: How to load record into a single table by using multiple data files.
Next Topic: UTL_FILE
Goto Forum:
  


Current Time: Thu Dec 26 08:25:11 CST 2024