SQL Server Subquery returned more than 1 value. This is not permitted when the subquery follows =, !

Posted by anilkumarn on Stack Overflow See other posts from Stack Overflow or by anilkumarn
Published on 2010-04-16T13:20:52Z Indexed on 2010/04/16 13:23 UTC
Read the original article Hit count: 162

Filed under:

Once i run this query, getting the following error. please help.

select OrderDetails.Sku,orderdetails.mf_item_number,orderdetails.Qty,orderdetails.Price,Supplier.SupplierId, Supplier.SupplierName,Supplier.DropShipFees, cost = (Select Supplier_Item.Price from Supplier_Item,orderdetails,Supplier where Supplier_Item.SKU=OrderDetails.Sku and Supplier_Item.SupplierId=Supplier.SupplierID ) from orderdetails,Supplier,Group_Master where invoiceid='339740' and OrderDetails.Mfr_ID = Supplier.SupplierId and Group_Master.Sku = OrderDetails.Sku

Msg 512, Level 16, State 1, Line 2 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

© Stack Overflow or respective owner

Related posts about sql