设万维读者为首页 万维读者网 -- 全球华人的精神家园 广告服务 联系我们 关于万维
 
首  页 新  闻 视  频 博  客 论  坛 分类广告 购  物
搜索>> 发表日志 控制面板 个人相册 给我留言
帮助 退出
江南风的博客  
江南风的博客  
https://blog.creaders.net/u/3799/ > 复制 > 收藏本页
我的名片
江南风
注册日期: 2010-05-12
访问总量: 4,560 次
点击查看我的个人资料
Calendar
我的公告栏
最新发布
· ORA-06553: PLS-382: expression
· Trigger: the mutating table er
友好链接
分类目录
【报税点滴】
【Database Tips】
· ORA-06553: PLS-382: expression
· Trigger: the mutating table er
存档目录
05/01/2010 - 05/31/2010
发表评论
作者:
用户名: 密码: 您还不是博客/论坛用户?现在就注册!
     
评论:
ORA-06553: PLS-382: expression is of wrong type
   

The function ldap_test( ) returns boolean. It runs perfectly itself. However, when I put it in the following SQL query, I caught the error "ORA-06553: PLS-382: experssion is of wrong type". Here's the details: select ldap_test('mypassword') from dual

ORA-06552: PL/SQL: Statement ignored
ORA-06553: PLS-382: expression is of wrong type
The reasons is that booleans are not allowed inside SQL expressions, they are only allowed within PL/SQL expressions. If you need to call a function returning a boolean value inside a SQL query, you'll need to create a wrapper function returning either a number or a character value. Or you change the function to return a number or a character value. I changed the return type of ldap_test( ) to integer and successfully executed the SQL query. select ldap_test_more('mypassword') from dual;

LDAP_TEST_MORE('mypassword')
----------------------------                            1

 
关于本站 | 广告服务 | 联系我们 | 招聘信息 | 网站导航 | 隐私保护
Copyright (C) 1998-2024. Creaders.NET. All Rights Reserved.