+ Start a Discussion
Ron HessRon Hess 

SOQL where & negative numbers

I am trying to write a query, using SOQL which locates a double value which is less than zero.

I can store a negative number, query the record by ID and get the negative number back, but in SOQL i can't specify this in a where clause.

so, using sforce explorer:

Select lat__c, lon__c from Account where lat__c > 37.36033397019124 and lat__c < 37.426343057829385 and lon__c > -121.97999954223633
and lon__c < -121.84335708618164

generates an error MALFORMED QUERY
unexpected char: "-"

if i try to escape the minus sign i get unexpected char "\"

i'm sure this is somewhere in the doc, but i couldn't find it on first pass search.

thanks
benjasikbenjasik
This is a bug, and has been logged. Feel free to log a case as well.