UPDATE
Chemicals.dbo.ChmProductCompositions
SET Vhap = SUM(PercentOfProduct)
FROM
Chemicals.dbo.ChmProductCompositions PC
JOIN Chemicals.dbo.ChmCompositionChemicals CC ON CC.ProductCompositionID = pc.ProductCompositionID
JOIN Chemicals.dbo.ChmChemicals C ON C.ChemicalID = CC.ChemicalID
WHERE IsHazardous = 1
I have the query above and I was wondering does something like the above query get the total sum and set it or the sum for each specific and set it?
I was also wondering if it gets the total sum and sets each one to the total how might I go about getting the sum for each individual item and then set it to that?