i've tried a flat insert without the () around the select, i just put them
there for easier readability to a coworker. i get the same result from the
query,
insert into summary
select sum(x) as x, .
from table
where condition = 'true'
group by whatever
error: FUNCTION: database_name.sum
i am using 5.0.22
but i found the problem. i'm an idiot. there was a space in one of my sum(x)
entries; sum (x), when i removed that, it worked fine.
thanks.
On 4/18/07, Tanner Postert [EMAIL PROTECTED] wrote:
5.0.22, does anyone know a workaround?
On 4/18/07, Michael Dykman [EMAIL
i'm using the following query:
REPLACE INTO vviews_total(
SELECT uuser_id, sum( vviews.views ) AS views, sum( vviews.embeds ) AS
embeds, sum( vviews.plinks ) AS plinks, sum( vviews.`30d` ) AS 30d, sum(
vviews.`7d` ) AS 7d, sum( vviews.`24h` ) AS 24h, sum( vviews.site30d ) AS
site30d, sum( site7d
Hi Tanner,
Tanner Postert wrote:
i'm using the following query:
REPLACE INTO vviews_total(
SELECT uuser_id, sum( vviews.views ) AS views, sum( vviews.embeds ) AS
embeds, sum( vviews.plinks ) AS plinks, sum( vviews.`30d` ) AS 30d, sum(
vviews.`7d` ) AS 7d, sum( vviews.`24h` ) AS 24h, sum(
In most common places where a VALUES list is specified you can
substitute a select statement which produces such a list. SQL is an
algebra after all. The only thing wrong with the syntax of the
original poster was the braces around the select statement itself.
Drop them and it should work fine.