Peter Tanswell wrote:
> 
> I have a query that I have created - it works against a MS-Access database
> but does not work with MySQL. I have searched through the MySQL notes that I
> have but cant find out why - I think its because of the AS MatTotal section
> of the query.

You can not use a column alias you define in the select list as a base 
column to some other calculated column in that same select list, i.e.:
SELECT A + B AS C, C / D AS E ....
Instead, use:
SELECT A + B AS C, (A + B) / D AS E ....
or:
SELECT C, C / D AS E
FROM (
        SELECT A + B AS C, D ......
        )

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291666
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to