我自己写了个存储过程,学习以下。
可是问题来了。
存储过程如下:
create or replace procedure test1
(indate in number, outplnmh out number)
isbeginselect plnmh into outplnmh from dlypln 
where wrkdt=indate;
commit;
end test1;
--调用存储过程
declare
  indate number;
  begin
   indate:=20070605;
   test1(indate,outplnmh);
   
end;
运行时错误提示:
PLS-00103: 出现符号 "DECLARE"每个程序单独运行都没有问题。放在一起运行则提示错误信息。
而且单独运行后,怎么没有结果呢??
我是在toad中选择procedure editor中作的

解决方案 »

  1.   

    create or replace procedure test1
    (indate in number, outplnmh out number)
    is
    begin
    select plnmh into outplnmh from dlypln
    where wrkdt=indate;
    commit;--没有用
    end test1;
    --调用存储过程
    --不要把这两个放到一起执行,分开执行
    declare
    indate number;
    begin
    indate:=20070605;
    test1(indate,outplnmh);
    end;
      

  2.   

    分开执行是不是在打开两个procedure editor??
    我这样做了。但是没有结果阿!!
    可是明明数据库中有数据阿!
      

  3.   

    declare
     indate number(8);
    outplnmh number(15,2);
      begin
      indate:=20070605;
       test1(indate,outplnmh);
       
    end;我这样执行后,总包错误信息:
    declare
    *
    第 1 行出现错误:
    ORA-00904: "INDATE": 标识符无效
    ORA-06512: 在 "DAWINS.TEST1", line 7
    ORA-06512: 在 line 6