Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.


Is there a way to check which subquerry returns more than one value?
Posted

Use In Instead of =


i believe your query will look like this
SQL
Select * from tbl1 where col1=(select col1 from tbl2)


Use In operator here
SQL
Select * from tbl1 where col1 in (select col1 from tbl2)
 
Share this answer
 
v2
You have to execute each sub-query to know which returns more than one row.
 
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