Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL puzzle
Gail Binkley wrote:
>
> Hi all,
>
> We've stumbled across a SQL puzzle that I was hoping that someone from
> the news group could clarify. Basically, we don't understand why one
> query works and another doesn't.
>
Not sure exactly why it fails, but you can avoid it with something like this:
select log_rat2n_mean,spot
from result
where exptid = 918
and (ch2in_mean/decode(ch2bn_median,null,1,0,1,ch2bn_median) > 2
or (ch1I_mean/decode(ch1b_median,null,1,0,1,ch1b_median) > 2
and log_rat2n_mean is not null;
Received on Tue Jan 23 2001 - 15:12:44 CST