小弟写了个存储过程,有几个参数传入到游标中
OPEN cursor_test('tablename', '123');
编译时会出现ORA-00942: table or view does not exist错误。怀疑是不是传参进去自动加上“造成的。其他传参没有问题。比如列名。就可以通过。只有表名有错误。如何解决。望指点
OPEN cursor_test('tablename', '123');
编译时会出现ORA-00942: table or view does not exist错误。怀疑是不是传参进去自动加上“造成的。其他传参没有问题。比如列名。就可以通过。只有表名有错误。如何解决。望指点
select TRUNC(AVG(aaabbb)), from abcd;
EGIN
OPEN testcur('name', 'tablename');
LOOP
...
主要是这几句。其他地方没问题。这样做会报ORA-00942: table or view does not exist
tablename表确实存在。
select TRUNC(AVG(aaabbb)) from abcd;
可能是这句sql中不允许使用变量作为 from 后的表名。换成动态sql看看。