Home Forums SQL Server 7,2000 T-SQL Convert positive number to a negative RE: Convert positive number to a negative
Bob Fazio
SSChampion
Points: 10794
More actions
October 17, 2007 at 9:40 am
#742784
DECLARE @a INT
SELECT @a = 1
SELECT @a = -@a
SELECT @a
SELECT @a=-@a
Note that @a*-1 doesn't change it unless you set it to itself.. Is that why you thought it didn't work?