views:

391

answers:

1

I have a SQL*Loader control file that has a line something like this:

FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '#'

Normally, I'd use a quotation mark, but that seems to destroy emacs's python syntax highlighting if used inside a multi-line string. The problem is that we are loading an ADDRESS_LINE_2 column where only 7,000 out of a million records are loading because they have lines like this:

...(other columns),Apt #2,(other columns)...

Which is of course causing errors. Is there any way to escape the enclosing character so this doesn't happen? Or do I just need to choose a better enclosing character?

I've looked through the documentation, but don't seem to have found an answer to this.

+1  A: 

I found it...

If two delimiter characters are encountered next to each other, a single occurrence of the delimiter character is used in the data value. For example, 'DON''T' is stored as DON'T. However, if the field consists of just two delimiter characters, its value is null.

Field List Reference

Jason Baker