解决方案 »
- sql 触发器代码,转ORACLE,请高手指点。。。
- ORACLE 日期参数格式怎么计算啊?各位高手,散分了
- 邹建,你好,请帮我看一下这个ORACLE存储过程的写法! 急,急!
- ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
- 请问想从事DBA方面的工作,需要把数据库原理细学一遍吗。还是直接用一个数据库学习
- dmp文件导入时是否可以只导入其中几张表?
- ora-01041错误?
- OMS已经配好,也可登入,无法通过Inteligence搜索器搜索到节点,提示"vni-4009"等
- oracle有没有自动增加字段,就是说那个字段不用设值,插入一条记录时数据库自动累加上1,用来做ID号用
- 这个查询语句如何修改,才能在存储过程中使用
- VC中通过ADO调用ORACLE带ref cursor的存储过程为何返回ORA-24338错误?
- 紧急提问:我的小型机死机了,怎么样关闭安全的关闭数据库,在重新启动小型机?在线...
create or replace procedure test11(pname in varchar2, pno in varchar2) is
-----sce---------------------不可逆反应
cursor c1 is
select substr(b.name, 4) c1, substr(d.name, 4) c2
from newreaction a, enzyme b, newreaction c, enzyme d
where a.id = b.id
and c.id = d.id
and b.type = 'enzyme'
and d.type = 'enzyme'
and a.pname = pname
and c.pname = pname
and a.proid = c.subid
and a.pno = pno
and c.pno = pno
and a.pno = b.pno
and c.pno = d.pno
and (a.type = 'irreversible' or c.type = 'irreversible');
---sce----------------------------可逆反应
cursor c2 is
select substr(b.name, 4) c1, substr(d.name, 4) c2
from newreaction a, enzyme b, newreaction c, enzyme d
where a.id = b.id
and c.id = d.id
and a.name <> c.name
and b.type = 'enzyme'
and d.type = 'enzyme'
and a.pname = pname
and c.pname = pname
and a.pno = pno
and c.pno = pno
and a.pno = b.pno
and c.pno = d.pno
and (a.proid = c.subid or a.proid = c.proid or a.subid = c.subid or
a.subid = c.proid)
and (a.type = 'reversible' and c.type = 'reversible');
begin
for rec in c1 loop
insert into test11 values (rec.c1, rec.c2); end loop;
for rec in c2 loop
insert into test11 values (rec.c1, rec.c2);
end loop;
commit;
end test11;
Compilation errors for PROCEDURE SYS.TEST11Error: PL/SQL: ORA-04044: 此处不允许过程, 函数, 程序包或类型Line: 38Text: insert into test11 values (rec.c1, rec.c2);Error: PL/SQL: SQL Statement ignoredLine: 38Text: insert into test11 values (rec.c1, rec.c2);Error: PL/SQL: ORA-04044: 此处不允许过程, 函数, 程序包或类型Line: 42Text: insert into test11 values (rec.c1, rec.c2);Error: PL/SQL: SQL Statement ignoredLine: 42Text: insert into test11 values (rec.c1, rec.c2);