Arithmetic Operators not working

7 views
Skip to first unread message

Stephen

unread,
Dec 10, 2009, 10:34:53 AM12/10/09
to Google Visualization API
Hi,

I trying to use arithmetic operators as described in
http://code.google.com/apis/visualization/documentation/querylanguage.html.
I'm running a query against a view in MySQL 5.0.67-community-nt. My
normal query:

query.setQuery('select regionName, total, goal where MonthYear="<%=
session.getAttribute("StartOfMonth") %>"');

works and returns my data, however when I try to use arithmetic
operators no data is returned:

query.setQuery('select regionName, (total/goal) where MonthYear="<%=
session.getAttribute("StartOfMonth") %>"');

Also tried:

query.setQuery('select total / goal where MonthYear="<%=
session.getAttribute("StartOfMonth") %>"');

And

query.setQuery('select total + goal where MonthYear="<%=
session.getAttribute("StartOfMonth") %>"');

I have checked that the types are the same. Do arithmetic operators
work when using MySQL?

Thanks,
Steve.


Reply all
Reply to author
Forward
0 new messages