Path: text.usenetserver.com!out01b.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail
From:  William Robertson <williamr2019@googlemail.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: How to compare NUMBER's
Date: Wed, 08 Aug 2007 00:45:07 -0700
Organization: http://groups.google.com
Lines: 25
Message-ID: <1186559107.608092.278260@d55g2000hsg.googlegroups.com>
References: <f9bmos$ojk$1@news.cn99.com>
NNTP-Posting-Host: 82.45.190.94
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Trace: posting.google.com 1186559107 30417 127.0.0.1 (8 Aug 2007 07:45:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 8 Aug 2007 07:45:07 +0000 (UTC)
In-Reply-To: <f9bmos$ojk$1@news.cn99.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: d55g2000hsg.googlegroups.com; posting-host=82.45.190.94;
   posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Xref: usenetserver.com comp.databases.oracle.misc:249150
X-Received-Date: Wed, 08 Aug 2007 03:45:08 EDT (text.usenetserver.com)

On Aug 8, 6:19 am, "Jimmy" <lofe...@yahoo.com.cn> wrote:
> 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.

Please post some values of s2 for those of us who aren't mathematical
geniuses.

