I am trying to insert a sum of prices from another table.

```
INSERT INTO Invoice_Of_Supplier (OrderSupplierID, PaymentStatus, Cost)
VALUES (
( SELECT OrderSupplierID FROM inserted),
0,
(SELECT SUM([Price(RUB)]) FROM Car
  JOIN OrderOfSupplier_Car AS osc ON osc.CarID=Car.CarID 
where osc.OrderSupplierID = (select OrderSupplierID from inserted)))

```

I have a `Car` table with fields `price` , `CarID` etc;

`Order_Of_Supplier` table with fields `OrderSupplierID`, `SupplierID`; 

And `Order_Of_Supplier_Car` table in which there is a number of cars for each order( fields are `CarID`, `OrderSupplierID`)

**I need to insert a row in table 'InvoiceOfSupplier' with fields 'OrderSupplierID', `PaymentStatus` and `Cost`.**

`OrderSupplierID` and `PaymentStatus` are ok, but `Cost` is `NULL` and I cant understand why. 
When i change on `osc.OrderSupplierID = 2`(getting `OrderSupplierID` directly) it doesn't work niether.
it Only works, when i remove all conditions like 'WHERE', but in this case it gets the 'Price(RUB)' of all orders, not the one I need.

*EDIT:*
The problem is that at the moment data was inserted in `Order_Of_Supplier` there was no data in `Order_Of_Supplier_Car`.