I need to do a "WHERE" filter in my code, like that:
"select
round ((aust.DTH_DESENFORNAMENTO - aust.dth_enfornamento),7)*1440 as HF
from
qt_qts.res_tubo_austenitizacao aust
WHERE
HF between 'time1' and 'time2' <----------------- THE ERROR
")
But it show that HF is not recognized in my code. So, i tried to put the full name (aust.DTH_DESENFORNAMENTO - aust.dth_enfornamento) and it worked... BUT, i need to put the full expression, what converts the time to seconds (((aust.DTH_DESENFORNAMENTO - aust.dth_enfornamento),7)*1440). That way, an error appear, cause of the expression.
I'm using ORACLE database
How can I refeer to the HF time with no error in my code?