#每天一点点,记录工作中实际可行操作#
解析经纬度字段 原始字段: POINT(116.094532 39.579501)
select city_name,
,split(regexp_replace(open_position,‘POINT\(|\)’,’’),’ ‘)[0] as start_point_lng
,split(regexp_replace(open_position,‘POINT\(|\)’,’’),’ ‘)[1] as start_point_lat
,split(regexp_replace(close_position,‘POINT\(|\)’,’’),’ ‘)[0] as close_point_lng
,split(regexp_replace(close_position,‘POINT\(|\)’,’’),’ ‘)[1] as close_point_lat
,pt
from table_name
where pt>=‘20180701’
and pt <‘20181030’
and close_position is not null
版权声明:本文为YmeBtc原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。