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) )


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.