I'm trying to run a cypher query where I have to compare a value stored as a String, but when I use the function toFloat
, I get an error :
Unknown function 'toFloat' (line 2, column 7)
"WHERE toFloat(r.acquiredValue) >= 100000"
^
I'm using Neo4j 2.0.1, and according to the Neo4j Cypher Refcard, the function exists, and even by looking at the source code of the community edition, I can find that the function is written.
Have you ever got this error ? How can I convert a string to float in a cypher query ? Thanks.
EDIT : Here is the query trying to run
MATCH (profile)<-[:HAS_PROFILE]-(c:Customer)-[r:HAS_PRODUCT]->(product)
WHERE toFloat(r.acquiredValue) >= 100000
RETURN c.customerId AS CustomerID, profile.code AS ProfileCode, product.name AS ProductName, r.acquiredValue AS AcquiredValue
ORDER BY r.acquiredValue DESC