OQL Sinus/Cosinus, Pi ...

0
Hi everyone   Is there possibility to user SQL standard function like SIN, pi, COS.    I need this information to calculate distance from latitude longitude.    Regars, Anahit Pahlevanyan
asked
2 answers
0

Hi Anahit,

 

We can’t do use those functions in OQL. I will attach the link for keywords available in OQL. You can refer this

.
https://docs.mendix.com/refguide/oql/

 

Thanks,

Vignesh

answered
0

No, you can’t use this easily from your Mendix application.

I have had to do something similar by implementing a Haversine equation in a Java Action. You pass in four decimals, the two latitudes and longitudes you need to calculate the distance between, and return a decimal with the result. 

Good luck!

answered