Home » RDBMS Server » Server Utilities » Multibyte shift columns (12.1.0.2.0)
Multibyte shift columns [message #670085] Mon, 04 June 2018 06:58 Go to previous message
Yiel
Messages: 3
Registered: June 2018
Junior Member
Hi everybody,

Im having a problem while loading a table with SQL Loader because of multibyte chars.

My table is:
CREATE TABLE TEST_UMLAUT 
(COL1	VARCHAR2(99 CHAR),
COL2	VARCHAR2(3 CHAR),
COL3	VARCHAR2(3 CHAR),
COL4	VARCHAR2(3 CHAR),
COL5	VARCHAR2(7 CHAR),
COL6	VARCHAR2(200 CHAR)
);

My controlfile is:
LOAD DATA 
CHARACTERSET AL32UTF8
INFILE '$FICHIER' BADFILE '$BAD'
APPEND
PRESERVE BLANKS
INTO TABLE TEST_UMLAUT
(
COL1 POSITION(1:99) CHAR,
COL2 POSITION(100:102) CHAR,
COL3 POSITION(103:105) CHAR,
COL4 POSITION(106:108) CHAR,
COL5 POSITION(109:115) CHAR
)

And my data line (7 spaces after the last I) is:
AAAAÖABCDEFGHIÖJKLMNABCDEFGHI

My result should be:
COL1=AAAAÖABCDEFGHIÖJKLMN
COL2=ABC
COL3=DEF
COL4=GHI
COL5= (7 spaces)

But i get:
COL1=AAAAÖABCDEFGHIÖJKL
COL2=MNA
COL3=BCD
COL4=EFG
COL5=HI (with 5 spaces at the end).

Can someone help me to get expected result?

Regards
Yiel
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: External Table
Next Topic: SQLLDR Error : Field in data file exceeds maximum length
Goto Forum:
  


Current Time: Thu Jan 23 05:17:21 CST 2020