You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
I have a table that is using a type of double precision. I am trying to perform a round(cast(column as numeric),2). When I perform this in psql I get the correct results. So 17.1799913573964 becomes 17.18. When I am using the datamapper postgre driver I get the value 0.1718E2. Any thoughts on this. Here is the psql query.
select id, round(cast(distance as numeric),2) miles, distance from (SELECT id, ( 3959 * acos( cos( radians(42.0926245) ) *cos( radians( lat ) ) * cos( radians( lng ) - radians(-88.1152973) ) + sin( radians(42.0926245) ) * sin(radians( lat ) ) ) ) AS distance FROM operator_positions ) position where distance < 20
The text was updated successfully, but these errors were encountered:
I have a table that is using a type of double precision. I am trying to perform a round(cast(column as numeric),2). When I perform this in psql I get the correct results. So 17.1799913573964 becomes 17.18. When I am using the datamapper postgre driver I get the value 0.1718E2. Any thoughts on this. Here is the psql query.
select id, round(cast(distance as numeric),2) miles, distance from (SELECT id, ( 3959 * acos( cos( radians(42.0926245) ) *cos( radians( lat ) ) * cos( radians( lng ) - radians(-88.1152973) ) + sin( radians(42.0926245) ) * sin(radians( lat ) ) ) ) AS distance FROM operator_positions ) position where distance < 20
The text was updated successfully, but these errors were encountered: