SELECT 1+1 as foo, 2 as bar, foo+bar

This will not work, but I think you can see what I am trying to do.  I need
to run a pretty hefty update on a database, and there are some pretty heavy
calculations I will be doing.  The result of many of those, needs to be
further used to make updates on other columns.

Can someone suggest a method to do this so my SQL is not so non-manageable?

Something like this:

SELECT price*tax_rate+something-other

Then I need to use the result of the above calc right away in some other
field, which would be:

SELECT price*tax_rate+something-other, ((price*tax_rate+something-other)+.6)

Where what I really want to do is:

SELECT price*tax_rate+something-other as foo, (foo+.6)

-- 
-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
<http://www.newgeo.com>                     Novato, CA U.S.A.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to