:::: www.foddex.net ::::
      Home      |      Blog      Tutorials      Reviews      |      Resume      Portfolio      |      Photos      Stuff      |      Unreal      Flame      |      Links
Foddex' head
Contact me

Stuff
NL Weather
NL Precipitation
Temperature
xkcd
ICHC
Slashdot
Kitten
wliia
TBBT - Zoom Zoom!!

BLOG: MySQL SUM whitespace weirdness [updated]

posted Fri 17-04-2009 09:07:46, in the nerd stuff (nerd stuff) category

I just found out that MySQL seems to have difficulties with whitespace in a very, very weird way. I needed to summarize all sizes for all documents stored in a customer's database, and so I executed this query (literally):

SELECT SUM (size) FROM `documents`

To my great surprise and frustration MySQL responded with:

FUNCTION dbname.SUM does not exist

Eh, 'xcuse me? Who's the genius who decided that SUM is no longer a function we want in MySQL? Turns out that removing the space between SUM and the parenthesis open did the trick:

SELECT SUM(size) FROM `documents`

And voila, my results....

I know MySQL can be a bit strange at times, but this one was a bit too much for me. Can anyone enlighten me on this? I'm running server version 5.0.45-community-nt on a Fedora 9 box.


[ update ]
I found this page.... I'm.... flabbergasted, to put it mildly...


-- Foddex

[ Back to blog listing ]

0 comment(s)

Leave a comment

Name (required)
URL
Copy this code1-556-593-382

Pressure building on my soul
I ask God to take control
Guide me through this fucked up world

-

I know someday you'll have a beautiful life, I know you'll be a star
In somebody else's sky, but why, why, why
Can't it be, can't it be mine