一个函数 function getvalue_func(codecode);返回值 varchar2 格式;这个里面codecode=0 报异常no found另一sql 语句调用:
select function getvalue_func(codecode) from tablename
where codetype <> '0';tablename数据存储 都是varchar2
codetype codecode
1 2
2 3
0 0其中codecode = ‘0’时 function getvalue_func(codecode) 查不到数据;select function getvalue_func(codecode) from tablename
where codetype <> '0';查询有结果select * from tablename
where codetype <> '0'
and function getvalue_func(codecode) <> '2' ;查询出异常 报异常no found打出来的值 竟然是 codecode =‘0’
崩溃中又试方法:
select * from (select codetype , codecode from tablename
where codetype <> '0')
and function getvalue_func(codecode) <> '2' ;查询出异常 报异常no found
有谁遇见过这种错误?
什么情况的啊。。这是 让我觉得数据库混乱了
数据库oracle
select function getvalue_func(codecode) from tablename
where codetype <> '0';tablename数据存储 都是varchar2
codetype codecode
1 2
2 3
0 0其中codecode = ‘0’时 function getvalue_func(codecode) 查不到数据;select function getvalue_func(codecode) from tablename
where codetype <> '0';查询有结果select * from tablename
where codetype <> '0'
and function getvalue_func(codecode) <> '2' ;查询出异常 报异常no found打出来的值 竟然是 codecode =‘0’
崩溃中又试方法:
select * from (select codetype , codecode from tablename
where codetype <> '0')
and function getvalue_func(codecode) <> '2' ;查询出异常 报异常no found
有谁遇见过这种错误?
什么情况的啊。。这是 让我觉得数据库混乱了
数据库oracle
解决方案 »
- 这样的sql怎样优化才能更快?
- ORACLE表权限问题
- plsql存储过程调试问题
- sqlldr语句用法
- SQL 错误: ORA-31000: 资源 'http://xmlbook.com/sample/contact.xsd' 不是 XDB 方案文档
- oracle根据3个分组,相同数据显示为空,算出3个小计,最后算出总计
- v$resource_limit视图中几个字段是什么意思?
- SQL Server中的 update from 子句在Oracle中对应语法是什么?
- 如何循环调用带返回值的存储过程。
- Oracle通过UTL_SMTP发送邮件,从网上搜了一个,收不到邮件,请大神帮忙看看啥情况?
- ORACLE 使用xmlagg获得clob输出问题
- 关于orcal序列问题?
select function getvalue_func(codecode) from tablename where codetype <> '0';
--》
select getvalue_func(codecode) from tablename where codetype <> '0';select * from tablename
where codetype <> '0'
and function getvalue_func(codecode) <> '2' ;
--》
select * from tablename
where codetype <> '0'
and getvalue_func(codecode) <> '2' ;调用函数的时候,把function 关键字去掉在试试。
哦 不好意思。。发的时候发激动了 必须不能带 function 发错了 。。手抖了 呵呵 不是这个问题