On 10 Oct 2002, at 11:45, Kevin wrote:

> SELECT column5, SUM(column5) FROM realdata WHERE processdate > "2002-8-31"
> AND column3 = "done" AND url REGEXP "mysql";
> 
> Thus, I get the 1140 error.

That's right.  You can't get the individual values and the sum at the 
same time.  The sum is a single value for the whole table, while 
there's a different individual value for each row, so they two things 
don't fit into the same result set.

Leave "column5," out of your query.  If you need the individual 
values, get them in a separate query, without the sum.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org

---------------------------------------------------------------------
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