Re: HELP! Oracle Error
From: Paul Beardsell <psb_at_sambusys.demon.co.uk>
Date: 1995/10/02
Message-ID: <812678234snz_at_sambusys.demon.co.uk>#1/1
Date: 1995/10/02
Message-ID: <812678234snz_at_sambusys.demon.co.uk>#1/1
In article <44p6ur$gsk_at_butch.lmsc.lockheed.com>
d_shaver_at_testbed.swfpac.lmsc.lockheed.com "Debbie Shaver" writes:
> What do you want to do if quantity is 0? Would something like this work?
>
> select * from sales where cost / decode(quantity,0,99999,quantity) > 0.5
>
> This assumes that if quantity is 0, dividing by the largest value
> quantity could be would return a value less than .5 and as a result would
> not be included in the data selected.
>
> Debbie
If that is the problem then much better is
select * from sales where quantity > 0
-- Paul Beardsell SAM Business Systems Ltd ~~~~~~~~~~~~~~ 21 Finn House, Bevenden St, pbeardsell_at_cix.compulink.co.uk London, N1-6BN, UK. psb_at_sambusys.demon.co.uk (+44 or 0)171 608-2391Received on Mon Oct 02 1995 - 00:00:00 CET