Home Forums SQL Server 7,2000 T-SQL Convert positive number to a negative RE: Convert positive number to a negative

  • DECLARE @a INT

    SELECT @a = 1

    SELECT @a = -@a

    SELECT @a

    SELECT @a=-@a

    SELECT @a

    Note that @a*-1 doesn't change it unless you set it to itself.. Is that why you thought it didn't work?