Weather Observation Station 19

  • + 0 comments
    SELECT 
            ROUND(CAST(SQRT(
                POWER(MAX(LAT_N)-MIN(LAT_N), 2) + POWER(MAX(LONG_W)-MIN(LONG_W),2)
            )AS DECIMAL(10,4)),4)
         AS Dist
    FROM Station
    

    This code worked for me because if I am not using decimal it's taking value till multiple place and round is not working properly