posted Fri 17-04-2009 09:07:46, in the 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 ]
| More nerd stuff...200920072006 |