comparison

  • select getdate()

    where '0.00' > '0'

    result: 2006-11-09 16:53:48.050

    select getdate()

    where '0' > '0'

    result: NONE

    What can I do that where '0.00' > '0' return nothing...

    any function that I can use?

     

  • This

    select

    getdate() where 0.0 > 0

    will return nothing.

    You have to convert the strings to numerics

    select

    getdate() where convert(numeric(5,2),'0.0') > convert(numeric(5,2),'0')

    also returns nothing


    And then again, I might be wrong ...
    David Webb

  • What are you trying to do???

    Your where clause has nothing whatsoever to do with what you are selecting.

    '0'>'0' is ALWAYS false.

    '0.00'>'0' is ALWAYS true.

    Now what? Or rather, so what?

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply