oracle 拆分字符串
来源:互联网 发布:tcl电视怎么样 知乎 编辑:程序博客网 时间:2024/05/17 01:55
最近从Excel中到了一些数据,结果一个列的数据是以逗号分隔的字符串,想把它拆分开找到了下边的方法,贴出来分享一下:
CREATE OR REPLACE PROCEDURE sptstr (srcstr varchar2) as
stmp varchar2(2000);
begin
select srcstr into stmp from dual;
while nvl(length(stmp),0) > 1
loop
insert into tabtest(col) select substr(stmp,1,instr(stmp,',')-1 ) from dual;
select substr(stmp,instr(stmp,',')+1) into stmp from dual;
end loop ;
commit;
end sptstr;
想要拆分用其它分隔符连接的字符串也可以,只要修改instr函数中的第二个参数就好了!
- oracle 拆分字符串函数
- oracle 拆分字符串
- Oracle 拆分字符串
- Oracle拆分字符串函数
- Oracle拆分字符串函数
- Oracle 字符串拆分
- ORACLE拆分字符串函数
- Oracle拆分字符串函数
- Oracle拆分字符串函数
- Oracle 拆分字符串
- Oracle拆分字符串函数
- Oracle拆分字符串函数
- oracle拆分字符串
- ORACLE字符串拆分
- Oracle拆分字符串函数
- Oracle拆分字符串函数
- oracle拆分字符串
- Oracle 拆分字符串函数
- oracle 10.2.0.4下载地址
- 龙之博
- C++从零开始(四)——赋值操作符
- 其实是自我欺骗
- Android FileObserver 用法
- oracle 拆分字符串
- 温爷爷忙不过来呀
- com本质论笔记
- SVCHOST.EXE进程详解
- 转] 女生皮肤必修课(哇哇,这么全的,怕以后找不到,是姑娘就转了~~)
- C++从零开始(五)——何谓指针
- 说明式的类或方法
- 工具和网络游戏封包基础
- 真诚是多么重要