create or replace procedure sp_check_to_et(
wf_id_in in number,
form_data_id_in in number,
et_id in varchar2
-- return_code out number,
--return_desc out varchar2
)
as
type c_array is table of varchar2(10) index by binary_integer;
p number default 0;
idx number default 0;
strc varchar2(500);
ca c_array;
et_id2 varchar(500);
begin strc:=et_id;
loop
p:=instr(strc,'-',1);
exit when p=0;
ca(idx):=substr(strc,1,p-1)||',';
dbms_output.put_line(ca(idx));
idx:=idx+1; p:=instr(strc,'|',1);
exit when p=0;
strc:=substr(strc,p+1,length(strc));
end loop;
declare
cursor indexs
is
select status_id from ecl_request_sheet where request_id in(ca(idx)) and container_type=4 ;
--定义一个游标变量
c_row indexs%rowtype;begin
open indexs;
loop
fetch indexs into c_row;
exit when indexs%notfound;
if c_row.status_id<>6 then
-- return_code:=1;
-- return_desc:='销售合同未结束';
dbms_output.put_line('OK');
else
-- return_code:=0;
dbms_output.put_line('NO');
end if;
end loop; --关闭游标
close indexs;
end; COMMIT; EXCEPTION WHEN OTHERS THEN
ROLLBACK;
RAISE;END;请问我这样里有什么问题。。上面是截取数据
类似101532-国外出差审批流程 [ 0|P,106-管理员 ] |101530-国外出差审批流程 [ 0|P,106-管理员 ]
这样两条 我只取它们的ID:101530,101532
中间写的显示游标。获得多列查询我截取出来的保存变量不能作为条件查询么?
错误是未找到任何数据。
select status_id from ecl_request_sheet where request_id in(ca(idx)) and container_type=4 ; 我把in后面的 换成(101530,101532)写死又可以。。逻辑是这样:我要截取ID作为条件查询。。存储
wf_id_in in number,
form_data_id_in in number,
et_id in varchar2
-- return_code out number,
--return_desc out varchar2
)
as
type c_array is table of varchar2(10) index by binary_integer;
p number default 0;
idx number default 0;
strc varchar2(500);
ca c_array;
et_id2 varchar(500);
begin strc:=et_id;
loop
p:=instr(strc,'-',1);
exit when p=0;
ca(idx):=substr(strc,1,p-1)||',';
dbms_output.put_line(ca(idx));
idx:=idx+1; p:=instr(strc,'|',1);
exit when p=0;
strc:=substr(strc,p+1,length(strc));
end loop;
declare
cursor indexs
is
select status_id from ecl_request_sheet where request_id in(ca(idx)) and container_type=4 ;
--定义一个游标变量
c_row indexs%rowtype;begin
open indexs;
loop
fetch indexs into c_row;
exit when indexs%notfound;
if c_row.status_id<>6 then
-- return_code:=1;
-- return_desc:='销售合同未结束';
dbms_output.put_line('OK');
else
-- return_code:=0;
dbms_output.put_line('NO');
end if;
end loop; --关闭游标
close indexs;
end; COMMIT; EXCEPTION WHEN OTHERS THEN
ROLLBACK;
RAISE;END;请问我这样里有什么问题。。上面是截取数据
类似101532-国外出差审批流程 [ 0|P,106-管理员 ] |101530-国外出差审批流程 [ 0|P,106-管理员 ]
这样两条 我只取它们的ID:101530,101532
中间写的显示游标。获得多列查询我截取出来的保存变量不能作为条件查询么?
错误是未找到任何数据。
select status_id from ecl_request_sheet where request_id in(ca(idx)) and container_type=4 ; 我把in后面的 换成(101530,101532)写死又可以。。逻辑是这样:我要截取ID作为条件查询。。存储
解决方案 »
- struts上传Excel问题
- jquery treeview 如何绑定数据库 用struts2框架
- dwr参数对像有Map属性出错的问题,急
- 如何只让IE可以访问所有的jsp页面?
- 寻找Apache+Resin来配置JSP
- java web项目中,你们是怎样实现文件的上传的啊?
- 请问下面说的是什么问题啊!真是晕啊,该怎么解决啊???
- 请教tomcat和apache成功整合后的两个问题
- 救急!!!!!!!jsp网页之间传递中文的问题
- 在页面点击删除时出现一个没看过的错误求大牛
- 部署在tomcat上的项目,部署没问题,但是运行一段时间后发现tomcat目录下该项目的web.xml文件消失
- 图片 IO 问题,进来看的都是牛人!
比如:c_request_id ecl_request_sheet.request_id%type;
cursor indexs
is
select status_id from ecl_request_sheet where request_id in(c_request_id) and container_type=4 ;
--定义一个游标变量
c_row indexs%rowtype;
begin
c_request_id:=ca(idx);
open indexs;
loop
fetch indexs into c_row;
exit when indexs%notfound;这样才行,要不然,变量是不识别的
还有我昨天截取还行,,今天怎么截取就截取不到ID了
这种类型的了101532,P,106,101530,P,106,