Skip to content
Advertisement

Select Subquery Group By

I am having an issue with this simple query. I get the error

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

I have tried working through this problem and know that there is a simple solution I am missing. The subquery, on its own, retrieves the information I am looking for, as does the main query, when separated. Thanks for any help!

Advertisement

Answer

put this condition AND dbo.Orders.PARTNO = dbo.Inventory.PARTNO and Top 1

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement