Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> How to compare NUMBER's
Table t1 has two fields s1,s2 both with type NUMBER(9,3),
After I exectue following sql,
"SELECT s1, (s1-s2)/s2 FROM t1"
result is:
000001, .872
000002, 0
While executing "SELECT s1, (s1-s2)/s2 FROM t1 WHERE (s1-s2)/s2>0.5",
result is:
no rows effected.
Why not "000001, .872"?
I wonder what's wrong if I write the condition in WHERE clause as
"(s1-s2)/s2>0.5"?
Thanks in advance. Received on Wed Aug 08 2007 - 00:19:59 CDT