Re: [SQL] Use derived expression in select statement

2003-09-13 Thread Tom Lane
"Richard Sydney-Smith" <[EMAIL PROTECTED]> writes: > select dy_c , dy_sect as tsect, (cy_bfwd + dy_p1T4) as curr_bal from fclitot > where dy_yr = 0 and (curr_bal) <-0.005 > In postgres it tells me curr_bal is not found. As it should --- this is completely illegal according to the SQL standard. I

[SQL] Use derived expression in select statement

2003-09-13 Thread Richard Sydney-Smith
I am converting a database from Sybase and have found the following command does not work in the same fashion. select dy_c , dy_sect as tsect, (cy_bfwd + dy_p1T4) as curr_bal from fclitot where dy_yr = 0 and (curr_bal) <-0.005 In the actual command used curr_bal is calculated from a very much lon