On Tuesday 18 September 2001 14:14, Andrew Dixon wrote:
> Hi everyone.
>
> I'm trying to do the following update, which someone at Macromedia gave me,
> however I get a SQL error when I'm trying to use it with MySQL, any ideas
> on what is wrong.

A general lack of support in MySQL for this kind of syntax.

> update general_users
> set rolling_total = sumUsr.rollingTotal
> from
> (
> select id,sum(jan+feb+mar+apr+may+jun+jul+aug+sep+oct+nov+dec) as
> rollingTotal
> from general_users
> group by id
> ) as sumUsr
>
> where general_users.id = sumUsr.id

Take a look at the manual pages on www.mysql.com.

HTH

Ian Barwick

-- 
Ian Barwick - Developer - [EMAIL PROTECTED]
akademie.de asp GmbH - http://www.akademie.de

"To query tables in a MySQL database is more fun than eating spam"

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to