Re: Limit query to a value

2001-09-07 Thread Benjamin Pflugmann
Hi. On Fri, Sep 07, 2001 at 07:12:47PM +0200, [EMAIL PROTECTED] wrote: > Hello, > How can I limit the query to those rows where "SUM(value) as Tot > 0". > If I put it in an where clause it get an error. That is to be expected, as in SQL the WHERE clause is evaluated before the SELECT clause (i.e

Re: Limit query to a value

2001-09-07 Thread Dana Powers
Add 'HAVING Tot>0' to your query. dpk - Original Message - From: "Lorang Jacques" <[EMAIL PROTECTED]> To: "Mysql" <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 10:12 AM Subject: Limit query to a value > Hello, > How can I limit the query to those rows where "SUM(value) as Tot > 0

Re: Limit query to a value

2001-09-07 Thread Adams, Bill TQO
Lorang Jacques wrote: > Hello, > How can I limit the query to those rows where "SUM(value) as Tot > 0". If I > put it in an where clause it get an error. So how to do that > SELECT id,url,title,description,top,keyword,SUM(value) as Tot FROM links > LEFT JOIN keywords on links.id=keywords.LinkId G