fnciton
-----oracle将字段字符分隔作为临时表
select column_value as site_id
from table (select fn_split_clob(dashboard_presend_sites_show, ',')
from ems.t_isdt_user_info
where hw_user_uuid = 'uuid~eVdYMzk3MzEy')
create or replace function fn_split_clob (p_str in clob,
p_delimiter in varchar2)
return ty_str_split is
j INT := 0;
i INT := 1;
len INT := 0;
len1 INT := 0;
STR varchar2(4000);
str_split ty_str_split := ty_str_split();
Begin
len := LENGTH(p_str);
len1 := length(p_delimiter);
while j < len loop
j := INSTR(P_str, p_delimiter, i);
if j = 0 then
j := len;
str := substr(p_str, i);
str_split.extend;
str_split(str_split.count) := str;
if i >= len then
exit;
end if;
else
str := substr(p_str, i, j - i);
i := j + len1;
str_split.extend;
str_split(str_split.count) := str;
end if;
end loop;
return str_split;
end fn_split_clob;
fnciton的更多相关文章
随机推荐
- CSS之viewport 2
在这个迷你系列的文章里边我将会解释viewport,以及许多重要元素的宽度是如何工作的,比如<html>元素,也包括窗口和屏幕. 这篇文章我们来聊聊关于移动浏览器的内容.如果你对移动开发完 ...
- linux udev 自动挂载 SD卡/U盘
本文记录使用udev自动挂载SD卡和U盘的方法. 参考链接 http://blog.chinaunix.net/uid-26119896-id-5211736.html 添加udev规则 创建文件/e ...
- Android 强烈推荐:程序员接私活那点事
今天周末在家宅着,并不是我不想运动,是因为北京的雨雪交加导致我想在家写文章,不过想想给大家写文章还是蛮惬意的,望一眼窗外,看一眼雪景,指尖在键盘上跳动,瞬间有种从屌丝程序员转变成了小姑娘们都羡慕的文艺 ...
- C语言一维数组、二维数组、结构体的初始化
C语言数组的初始化表示方法 一.C语言一维数组初始化: (1)在定义数组时对数组元素赋以初值.如: static int a[10]={0,1,2,3,4,5,6,7,8,9}; 经过上面的定义和初始 ...
- Mongodb在windows下的安装和启动
在windows下安装的参考官方地址:https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/ Mongodb的安装与启 ...
- php登陆与注册
登陆页面 <body><h1>登录页面</h1><form action="./dengluchuli.php" method=" ...
- sql 中convert和cast区别
SQL中的cast和convert的用法和区别 更多 来源:SQL学习浏览量: 学习标签: cast convert sql 本文导读:SQL中的cast 和convert都是用来将一种数据类型的表达 ...
- Add&Delete WindowService
Part One-Add: Step4: Add the new service to windows service: $commandLine = 'D:\IMS\2.16.0.42-DataSe ...
- FusionChart 数据的传入方式
已有案例,懒得写了,放个链接,大家看看吧.http://www.cnblogs.com/liujian21st/archive/2013/03/22/2975124.html
- Java Thread wait, notify and notifyAll Example
Java Thread wait, notify and notifyAll Example Java线程中的使用的wait,notify和nitifyAll方法示例. The Object clas ...