ITPub博客

首页 > 数据库 > Oracle > Compilation Error:function 'NAME_IN' may not be used in SQL

Compilation Error:function 'NAME_IN' may not be used in SQL

原创 Oracle 作者:pan_tian 时间:2014-07-03 11:41:49 0 删除 编辑

编译pll文件,编译报错
PL/SQL ERROR 231 at line 1009, column 45
function \'NAME_IN\' may not be used in SQL
PL/SQL ERROR 0 at line 1006, column 4
SQL Statement ignored

Failed to generate library.

FRM-30312: Failed to compile the library.

原因:pld/pll文件中增加,新增代码

select ALLOCATE_LOT_FLAG
into L_ALLOCATE_LOT_FLAG
from mtl_parameters
where organization_id = TO_NUMBER(NAME_IN(\'parameter.org_id\'))
and rownum = 1;

SQL语句中不能直接使用NAME_IN,需要先赋给一个变量之后,再在SQL中引用这个变量。例如可以把上边的代码修改成:

   orgid1 := TO_NUMBER(NAME_IN(\'parameter.org_id\'));
   
   select ALLOCATE_LOT_FLAG
   into L_ALLOCATE_LOT_FLAG
   from mtl_parameters
   where organization_id = orgid1
   and rownum = 1;


<!-- Baidu Button BEGIN -->

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1207469/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: FRM-92101: There was a failure in the Forms Server during startup.
下一篇: 那些年用过的手机
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2012-02-18

最新文章