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作为条件查询。。存储
解决方案 »
- org.apache.commons.dbcp.SQLNestedException
- final 传变量参数
- tomcat 外网 站点名
- 有jsp的web开发中,客户端是什么?
- 一个jsp网站建设的问题,初学编程,麻烦大家了
- EOFException是怎么造成的?
- struts-config.xml中的 action配置set-property标签如何使用
- struts下的jsp报错 java.lang.NullPointerException
- 有意参加"为中国Java加油"的本版兄弟 进来签个名!
- 当用Servlet把某页面重定向到一JSP页面(如A页面)时,如何将一个值赋给这个页面(A页面)中的表单里的一个隐藏域(hidden)?
- 部署在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,