Well, it doesn't solve the ordering question, but you could
use a where something like this I guess:
where y>0 and (x/(case when y=0 then 1 else y end))>1

On Wed, 14 Feb 2001, Patrick Welche wrote:

> create table vals (
>   x float,
>   y float
> );
> insert into vals values (2,4);
> insert into vals values (2,2);
> insert into vals values (2,1);
> insert into vals values (2,0);
> select x/y from vals where y>0 and x/y>1;
> 
> will give a divide by zero error as A=(y>0) and B=(x/y>1) can be evaluated in
> any order (A and B = B and A). I obviously would like (y>0) to happen first,
> but I don't see how this can be achieved.. Any ideas?

Reply via email to