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

  • Here's another way to always endup with a negative number (this works whether you start with a positive or a negative number):

    DECLARE @a INT

    SET @a = 1

    SET @a = (-1)*sign(@a)*@a

    Select @a

    Kindest Regards,

    --SF

    (SELECT COALESCE(Phlogiston,Caloric,DarkMatter) as Construct FROM Science.dbo.Theory)