是mmcx:='''%'||mcx||'%''';条件的问题。改成mmcx:='%'||mcx||'%';试试
解决方案 »
- 求iPlanet Application Server6.5下载地址(一定要可用的)
- 请问怎么知道某个表放于哪个表空间?
- <<<>>>在plsql 中是什么符号?
- 内存数据库的问题
- 同一个包中的两个过程互相调用
- C/S模式客户端直接接入数据库可以吗
- 请问 请问 dbms_output.put 怎么不能显示?怎么不能显示?
- ORACLE中创建表时出现如下提示如何解决???新的问题
- 如果实现通过两个个表的三个字段的值返回相应的常量?如果:A.a1 Not NULL AND B.b1 NOT NULL返回 '0',A.a1 NOT null and B.b1 is NU
- 现在在ORACLE官方网站有一个Oracle9i Release2 for windows server 2003(64-bit) 的版本,是什么意思
- 两字段和为一字段的SELECT语句.
- 請教oracle的变量,分配內存該怎麼理解,怎麼才能掌握?
cursor mycursor(p_1 varchar2) is
select id from t_fl where cx like '%'||p_1||'%';
begin
open mycursor(mmcx);
改成
open mycursor(mcx);
open mycursor(mcx);
(
mcx in varchar2,
merror out varchar2
)
is
type v_sl is table of number;
a_v_sl v_sl:= v_sl();
begin
declare
i number(10);
begin
declare
cursor mycursor(p_1 varchar2) is
select id from t_fl where cx like '%'||p_1||'%';
begin
open mycursor(mcx);
fetch mycursor into a_v_sl(1);
i:=2;
while mycursor%found loop
fetch mycursor into a_v_sl(i);
i:=i+1;
end loop;
close mycursor;
end;
end;
merror:=a_v_sl(1);
return;
exception
when others then
merror := 0;
rollback;
return ;
end;谢谢楼上的朋友们,我现在按你们,改成这样的,但结果一直还回0,说明有错,道理应还回1(因第一条数据的ID是1)
fetch mycursor into a_v_sl(1); a_v_sl.extend;
fetch mycursor into a_v_sl(i);
我费一个上午的时间,我自己也刚发现,加了a_v_sl.extend(10)就可以;
前天宿舍被盗,两台5月份买的笔记本和三部手机被盗.这几天情绪抵,工作都不能集中结账