分区语句整理 5
来源:互联网 发布:vibe算法 编辑:程序博客网 时间:2024/05/01 01:36
begin
/**
* @description exc_error1 will be raised if iv_username is null and the input string have 4 split symbol
* @description get the users' number which is from input parameter
*/
if (iv_username is null) then
raise exc_error1;
elsif instr(iv_username,',',1,4)>0 then
raise exc_error1;
end if;
vi_users_num:=((length(iv_username)-length(replace(iv_username,',')))/length(','))+1;
/**
* @description split the input parameter, get the exactly user name and check whether them are exist in the system,
raise the exc_error3 if some one is not exist.
*/
vv_capi_usernam := upper(iv_username);
if vi_users_num = 1 then
vv_user1 := vv_capi_usernam;
vv_user2 := null;
vv_user3 := null;
vv_user4 := null;
execute immediate 'select count(*) from all_users t where t.username='''||vv_user1||'''' into vi_users_flag ;
if vi_users_flag <> 1 then
raise exc_error3;
end if;
elsif vi_users_num = 2 then
vv_user1 := substr(vv_capi_usernam,1,instr(vv_capi_usernam,',',1,1)-1);
vv_user2 := substr(vv_capi_usernam,instr(vv_capi_usernam,',',1,1)+1,(length(vv_capi_usernam)-instr(vv_capi_usernam,',',1,1)));
vv_user3 := null;
vv_user4 := null;
execute immediate 'select count(*) from all_users t where t.username in ('''||vv_user1||''','''||vv_user2||''')'
into vi_users_flag ;
- 分区语句整理 5
- 分区语句整理
- 分区语句整理 2
- 分区整理语句 3
- 分区语句整理 4
- 分区语句整理 6
- 分区语句整理 7
- 分区语句整理 8
- 语句整理
- hive分区语句
- 表分区常用语句
- MySql分区类型以及建分区语句
- SQL Server 表分区整理
- 分区索引碎片整理Script
- 表分区处理语句记录
- hive修改 表/分区语句
- 批量生成添加分区语句
- hive修改 表/分区语句
- Linux模块调用模块
- 机器学习基石笔记13——机器可以怎样学得更好(1
- CentOS 配置防火墙操作实例(启、停、开、闭端口)
- wifidog 认证服务器如何授权和使用用户配置文件
- Spring中Quartz的配置
- 分区语句整理 5
- 网络安全知识学习
- response.getWriter().write()与out.print()的区别
- 分区语句整理 6
- Android Fragment的使用
- 躲避杀软抓取系统明文密码
- 分区语句整理 7
- JAVA 正则表达式 (超详细,转)
- TransientDataAccessResourceException和java.sql.SQLException: boo!