Sunday, June 5, 2016

SQL oracle functions



select case when length(substr(ct,instr(ct,'.')+1,4)) = 3
            then to_char(ct) || '0'
            else to_char(ct) end
from (
select round(
    sqrt(power(min(long_w) - min(lat_n),2) + power(max(long_w) - max(lat_n),2))
    ,4) ct from station
);

No comments:

Post a Comment