UPDATE A
SET A.Cost = B.Cost,A.TotalCost = B.Cost * A.Qty
FROM txn A
LEFT JOIN Item B ON A.ItemId = B.ItemId
WHERE A.Source = N'Борлуулалт'

UPDATE Item SET AvgCost = Cost