您的位置:首页 > 数据库

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

2013-05-24 15:45 423 查看
编译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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐