当前位置: 代码迷 >> Oracle开发 >> ora-01036 非法的变量名/编号?测试不通过,该怎么解决
  详细解决方案

ora-01036 非法的变量名/编号?测试不通过,该怎么解决

热度:423   发布时间:2016-04-24 07:35:28.0
ora-01036 非法的变量名/编号???????测试不通过
我刚学习PL/SQL Developer,试写了个存储过程如下:
SQL code
create or replace procedure pp(in_num number,out_num out number) astotal1 number:=0;total2 number:=0;begin  select sum(s.totalmoney)  into total1 from salerecord s where s.customerid = in_num;  select sum(s.totalmoney)  into total2 from salerecord s;  out_num := round((total1/total2*100),2);  dbms_output.put_line('地区编号为'||in_num||'的地区的销售额占总销售的百分之:'||out_num);end;

编译成功后,在使用

SQL code
declaret_t number;begin  -- Call the procedure  pp(2,t_t);  dbms_output.put_line(t_t);end;

测试时却总提示
ora-01036 非法的变量名/编号
,请高手指点.


------解决方案--------------------
语句看起来没问题
真的是原语句复制出来的吗...
都在pl/sql developer里执行的?
这个错误和sql语句中的绑定变量有关