oracle bulk loader processing columns with newline characters
2
votes
0
answers
508
views
I'm trying to load a file with description columns which may contain newline characters. The file is Unix format utf16, tab separated and description columns are enclosed in ". The problem is bulk loader assumes the newline is end of record even though it is enclosed in the " characters, and it would create more rows than there should be.
Here's an example of the record I tried to load:
`key_column description
1 "very
long
description"
2 "some more ""
description"
3 "even more '
description"`
Here's what I have for my control file:
`load data
CHARACTERSET UTF16
infile 'C:\LoadWSRworkfolder\book1.txt'
badfile 'C:\LoadWSRworkfolder\wsl2106.bad'
append into table load_table1
fields terminated by " "
optionally enclosed by '"'
trailing nullcols
(
key_column,
description char(4000)
)
`
Asked by Kevin Tianyu Xu
(121 rep)
May 14, 2015, 12:38 AM
Last activity: May 14, 2015, 12:44 AM
Last activity: May 14, 2015, 12:44 AM