Wednesday , April 24 2024

Subquery returned more than 1 value

 

ERROR MESAGGE:

“Microsoft SQL Native Client (0x80004005)

Subquery returned more than 1 value. This is not permitted when the subquery
follows =, !=, <, <= , >, >= or when the subquery is used as an expression.”

EXPLANATION:

In T-SQL, this error will occur if more than one value is assigned to a variable.

SOLUTION:

Only one record can be assigned to a variable at a time. We usually get this error when we want to assign a query result to a variable. In such cases, make sure that the number of rows returned is not more than 1.

Loading

About Ekrem Önsoy

The original article was written in Turkish by Ekrem Önsoy and translated to English by dbtut with the consent of the author. The copyright of the article belongs to the author. The author shall not be liable in any way for any defect caused by translation.

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories