Please can someone advise if it is possible to update a variable after the initial SET statement. I want the variable to be updated with a single value based on several other values added together.
SET @TotalDuration = (SELECT Averages.Repair + Averages.Invoiced FROM Averages)
Receiving "Incorrect syntax near SET..."
The variable will then be used in a subsequent query as opposed to repeating the calculation over and over.