无法解决此错误 [英] Can't Solve with this error

查看:73
本文介绍了无法解决此错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SELECT MenuID,MenuName,ParentID,
IsNull((Select 1 As Allow from [tb_GE_UserLevelMenu]
Where MenuID = A.MenuID AND SysID = " & UserLevelID & " ),0)
As checked FROM tb_GE_Menu As A ORDER BY SrNo




<pre>









此错误





with this error

Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

推荐答案

错误很明显。您用于已检查列的子查询返回多个结果。向内部where子句添加更多条件,这样您将只获得一行而不是多行。
The error is clear. The sub query, which you have used for the "checked" column is returning more than one result. Add more condition to that inner where clause so that you will get only one row instead of many.


这篇关于无法解决此错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆