USE SmartStore
UPDATE A 
SET Cost = ISNULL(B.Cost,0),A.TotalCost = A.Qty * ISNULL(B.Cost,0)
FROM Txn A 
LEFT JOIN Item B ON A.ItemID = B.ItemID
WHERE Source = N'Борлуулалт'







