Hi guys. I´ve got a low-priority, non-important newbie question: 

Is it possible to refer into a query to a result field from the same query?. 
For example: a query which uses the field name of a result (alias) to create a 
new field: 

Select a.field1, 
(a.field2+a.field3) AS result1, 
(result1*100) AS result2  #Here is the question. 
FROM table1 AS a
GROUP BY a.field1

I know I can get the desired result with the following query

Select a.field1, 
(a.field2+a.field3) AS result1, 
((a.field2+a.field3)*100)  AS result2
FROM table1 AS a
GROUP BY a.field1

but, sometimes I have quite big calculations into a query a I need to use them 
quite often. 

I used to do that in MSAccess (because it is possible ot save queries). Is it 
possible or there is a way to re-use results from a query in MySql?. 

Thanks guys and very best regards. 

PD: Anyway, I do love my transition from MSAccess to MySql. My system is: MySql 
4.1.10 into a Debian Sarge Box. 

Reply via email to