SQL Guru Question:

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux