Home Dashboard Directory Help
Search

Error "Subquery returned more than 1 value." by max_daw


Status: 

Resolved
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 790563
Opened: 6/20/2013 7:11:57 AM
Access Restriction: Public
1
Workaround(s)
view
1
User(s) can reproduce this bug

Description

Query returns an error "Subquery returned more than 1 value", but after applying conditions in the where clause (n.Qty <= 1) we have not any data for which subquery can return multiple values.
Error is not returned if you uncomment ", n.Qty" in the select list.

@@version
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Jun 28 2012 08:36:30 Copyright (c) Microsoft Corporation Express Edition with Advanced Services (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
Details
Sign in to post a comment.
Posted by Microsoft on 1/5/2014 at 6:46 PM
Thanks for submitting this feedback. We will look into this issue and update you with the result of our findings. Thanks for your continued support in improving SQL Server.
Sign in to post a workaround.
Posted by max_daw on 6/20/2013 at 7:13 AM
Add "top (1)" in subquery or uncomment ", n.Qty" in select list.