SQL Server Subquery returned more than 1 value. This is not permitted when the subquery follows =, !
- by anilkumarn
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.