Home >Database >Mysql Tutorial >Oracle外部表处理中文字符

Oracle外部表处理中文字符

WBOY
WBOYOriginal
2016-06-07 17:07:441136browse

在外部表的文件中,若文件中的字段由ctrl+F来分割,由于ctrl+F分隔符在中文后面无法被识别,使得外部表导入出现问题,解决办法是

在外部表的文件中,若文件中的字段由ctrl+F来分割,由于ctrl+F分隔符在中文后面无法被识别,使得外部表导入出现问题,解决办法是在 创建外部表的过程中加入:

characterset 'AL32UTF8'

例:

drop table tablename

create table tablename

(

id

var    char2(40),
age     

int,
name   

varchar2(40),

 

)

Organization External

(

type Oracle_Loader

default Directory Extfile_data

Access parameters

(

records delimited by newline

badfile ExtFile_bad:'tablename_%a_%p.bad'

logfile Extfile_log:'tablename_%a_%p.log'

characterset 'AL32UTF8'

fields terminated by x'06'

missing field values are null

(

id

char(40),
age

,
name  

char(40)

 

)

)

Location ('filename')

)

Parallel

Reject limit Unlimited;

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn