November 9, 2006 at 6:00 pm
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?
November 9, 2006 at 6:44 pm
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
November 10, 2006 at 5:22 am
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