Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> How to compare NUMBER's

How to compare NUMBER's

From: Jimmy <lofenee_at_yahoo.com.cn>
Date: Wed, 8 Aug 2007 13:19:59 +0800
Message-ID: <f9bmos$ojk$1@news.cn99.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US