SQL Guru Question:
| From: | Pete | Date: | Tue, 26 Nov 2002 12:18:54 +0000 |
| Subject: | SQL Guru Question: | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-23666@lists.php.net to get a copy of this message | ||
I'm trying to write a query to update the comission calculations on a database
The sql looks something like
select
(round(pr_contents * 12)+ round(pr_buildings * 12)) *.33 as agent,
(round(pr_contents * 12) + round(pr_buildings * 12)) * .5 as manager,
from pipeline
if there a way of having a "precalculated" field eg
select
(round(pr_contents * 12)+ round(pr_buildings * 12)) as calc,
calc * .33 as agent,
calc * .5 as manager,
from pipeline
tia
pete