I am importing a csv file into an Oracle database using an external table.
The file encoding is
UTF-8. The separator is actually
The target table definition is identical to the external table definition.
NLS_LENGTH_SEMANTICS is defined as
Target character fields are defined as
COMESFROMTOWN VARCHAR2(50), (example).
Reading the external table and loading into the target table works fine for the majority of them. But records with
COMESFROMTOWN length of 49 to 50 characters including a ',' (comma) are rejected because of length:
ORA-12899: value too large for column COMESFROMTOWN (actual: 50, maximum: 50)
I tried resizing the external table fields, but the issue also happens when loading the target from the external table. Resizing the target is not an option.
Can you explain why:
- The comma being the 2c
UTF-8character, coded on 1 byte, it raises an error?
NLS_LENGTH_SEMANTICSbeing defined as CHAR, it does not uses the requested number of bytes for the string?
How can I workaround this ?