I am trying to use Case to catch reward totals that are greater then 100 so that I can set the max at 100. I am getting on the When Total > 100 Line. It says
Msg 102, Level 15, State 1, Line 7
Incorrect syntax near '>'.
Code:SELECT DISTINCT ACCOUNTID , Bonus , ColA , ColB , ColC , Reward = CASE Total WHEN Total > 100 THEN 100 ELSE Total END AS FROM Rewards




Reply With Quote