Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unanswered: Replace negative values

    hi,

    In the result of a function in my query, there are negative numbers.

    How do I replace them with a 0 or is there a function like ISNULL that replaces the values that are negative?

    thanks,



    maarten

  2. #2
    Join Date
    Feb 2002
    Location
    Assam, India
    Posts
    55

    Smile

    You can modify select statement to something like this-

    select item, qty, value=
    case
    when value < 0 then '0' else value
    end
    from test




    Roshmi Choudhury

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •