存储过程执行后不出错,但表中也未插入数据,是何原因?

jjff 2006-06-12 02:19:59
create or replace procedure proc_insert( vjh out char,jls out number)
as
begin
select jh into vjh from dde01;
select count(*) into jls from tszl_tsjcsj;
if (jls=0) then
insert into tszl_tsjcsj(jh) values(vjh);
end if;
end;
...全文
482 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiaoyao820820 2006-06-15
  • 打赏
  • 举报
回复
在Oracle 中执行就行了。
它是一个任务
在试图 user_jobs 中可以查询

declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss')+1');
commit;
end;
jjff 2006-06-13
  • 打赏
  • 举报
回复
这段程序放在那里?

在12:00:00 执行
declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
commit;
end;
xiaoyao820820 2006-06-12
  • 打赏
  • 举报
回复
在12:00:00 执行
declare
job_id integer;
begin
dbms_job.submit(job_id,'proc_insert(''10'',''1'',''1'');',to_date('6.12.06 12:00:00','mm.dd.yy hh24:mi:ss'),'sysdate+12');
commit;
end;

xiaoyao820820 2006-06-12
  • 打赏
  • 举报
回复
out :是输出参数 ,当然没有什么用处了
jjff 2006-06-12
  • 打赏
  • 举报
回复
修改后如下,按F8后显示编译成功,我想让过程在0点执行,下一步该如何做呢?
create or replace procedure proc_insert
is
jls integer;
vjh varchar2(16);
begin
select jh into vjh from dde01;
select count(*) into jls from tszl_tsjcsj;
if (jls=0) then
insert into tszl_tsjcsj(jh) values(vjh);
commit;
end if;

end;
Study_Now 2006-06-12
  • 打赏
  • 举报
回复
没提交,加上它commit就可以了
chenjx583 2006-06-12
  • 打赏
  • 举报
回复
感觉你存储过程的参数都没有用到,那两个参数有什么用?

17,140

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧