Link to home
Start Free TrialLog in
Avatar of zintech
zintech

asked on

SQL ROUND function error

I have the following SQL code that I would like to execute, but it says there is an error near "(" and I can't figure out what it is.  I am guessing it has something to do with the ROUND function.

UPDATE EVM
SET PercentComplete = @PercentComplete,
ROUND((EV = case when Budget > 0 then  
(PercentComplete / 100) * Budget
else
0
end), 2)
 WHERE ID = @ID
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I presume you want this?
UPDATE EVM 
   SET PercentComplete = @PercentComplete
     , EV = ROUND((case when Budget > 0 then (PercentComplete / 100) * Budget  else 0 end), 2)
 WHERE ID = @ID 

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of nitinsawhney
nitinsawhney
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial