Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
SQL
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
XML
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.
Posted
Updated 8-Jun-15 18:03pm
v2

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900