Subject Better way to write
Author Nick Upson
This statement

select p.price, p.deviza,
p.price*(cast(ex.rate as double precision)/cast(ex_to.rate as double
precision)) as total
from MyItems p
where (total>100)and(total<200)

complains about field total

this one below works, but seems inefficient and has a maintenance headache,
easy to mistype 1 of the 3 identical statements

select p.price, p.deviza,
p.price*(cast(ex.rate as double precision)/cast(ex_to.rate as double
precision)) as total
from MyItems p
where (p.price*(cast(ex.rate as double precision)/cast(ex_to.rate as
double>100) and (p.price*(cast(ex.rate as double precision)/cast(ex_to.rate
as double<200)

--
Nick
-----We Solve your Computer Problems---
Founder & Listowner of the Prolifics User Group
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly