免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2655 | 回复: 1
打印 上一主题 下一主题

请教:JAVA中调用存储过程报284错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-08-11 18:17 |只看该作者 |倒序浏览
跟踪后发现是一条select语句查询结果有重复值。加rowid跟踪发现是两条记录,但其中一条记录不不是满足条件的。

单独执行存储过程没有报错。

单独执行select语句,结果也只有一条记录。

怀疑是不是where语句中的字段名的问题,加了表名还是报284错。

请教各位高手,这是什么原因?先谢谢了。

论坛徽章:
0
2 [报告]
发表于 2005-08-13 11:57 |只看该作者

请教:JAVA中调用存储过程报284错

是不是在整个应用程序执行过程中动态修改了什么。


-284

__________________________________________________________

A subquery has returned not exactly one row.

A subquery that is used in an expression in the place of a literal value must return only a single row and a single column. In this statement, a subquery has returned more than one row, and the database server cannot choose which returned value to use in the expression. You can ensure that a subquery will always return a single row. Use a WHERE clause that tests for equality on a column that has a unique index. Or select only an aggregate function. Review the subqueries, and check that they can return only a single row.

This error can also occur when you use a singleton SELECT statement to retrieve multiple rows. You must use the DECLARE/OPEN/FETCH series of statements or the EXECUTE INTO statement to retrieve multiple rows.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP