在新的应用中需要将汉字转换为拼音,考虑使用外部表来实现
create or replace directory data_dir as '/app/oracle/admin/gsweb/bdump/'
/
-- copy dm_hz.csv to $ORACLE_BASE/admin/gsweb/bdump/
create table dm_hz
(
HZ varchar2(10) ,
PY varchar2(10) ,
SD varchar2(10) ,
WB varchar2(10) ,
YXBZ varchar2(10)
)
organization external
(type oracle_loader
default directory data_dir
access parameters
(
records delimited by newline
FIELDS TERMINATED BY ','
missing field values are null
( HZ ,
PY,
SD,
WB ,
YXBZ
)
)
location ('dm_hz.csv')
)
/
再创建一个function
@create_fun_GET_HZ_PY.sql
ok .end.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/271063/viewspace-904914/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/271063/viewspace-904914/