SQL * Loader does not recognize the separator "¥"

When trying to load a UTF-8 file with a ¥ delimiter, it does not separate the fields when it finds this symbol. We get ORA-12899 error from a value exceeding the size of the column because it is trying to fit the entire row in the first column.

In UTF-8 ¥ Â ¥ (C2A5), but it seems like he is trying to find C2C2A5.

Database settings

NLS_LANGUAGE SPANISH NLS_TERRITORY SPAIN NLS_CURRENCY ? NLS_ISO_CURRENCY SPAIN NLS_NUMERIC_CHARACTERS ,. NLS_CHARACTERSET WE8ISO8859P15 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD/MM/RR NLS_DATE_LANGUAGE SPANISH NLS_SORT SPANISH NLS_TIME_FORMAT HH24:MI:SSXFF NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR NLS_DUAL_CURRENCY ? NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_RDBMS_VERSION 11.2.0.3.0 

We tried:

 NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 NLS_LANG=SPANISH_SPAIN.WE8MSWIN1252 

We run SQL * Loader from the command line on a Windows 7 machine with the Spanish language.

Control file:

 LOAD DATA CHARACTERSET UTF8 INFILE 'C:\tmp\xxxy.txt' BADFILE 'C:\tmp\xxxy.bad' TRUNCATE INTO TABLE SAMPLE.TEST_CAR_VENCIMI_INTERMED fields terminated by "¥" TRAILING NULLCOLS ( CODE CHAR "upper(ltrim(rtrim(:CODE)))", CIF CHAR "upper(ltrim(rtrim(:CIF)))", CODIGO_PRESTAMO CHAR "upper(ltrim(rtrim(:CODIGO_PRESTAMO)))" ) 

Example data file:

 21AK0100¥P11111111F¥910002¥000000000106013.64¥666666666¥ mail@domain.com ¥address¥11111¥Name¥Surname 1¥Surname 2¥ mail2@domain.com ¥666666666 
+5
source share
1 answer

Since you are using the UTF8 character and the UTF8 file format (I think), for the session that runs SQL * Loader, set the NLS_LANG environment variable to "SPANISH_SPAIN.UTF8".

+1
source

All Articles