问题描述
drop table if exists `xuzhiguo`.`not_arrived_dest_port_20210118_03`;
create table `xuzhiguo`.`not_arrived_dest_port_20210118_03`
row format delimited fields terminated by '\t' as
select t1.mmsi,t1.utc,t1.lon,t1.lat,t1.planarrivedtime,t1.updatetime,t1.dest,from_unixtime(cast(t2.utc1 as bigint),'yyyy-MM-dd HH:mm:ss') as arrivedporttime
from `xuzhiguo`.`not_arrived_dest_port_20201230_03` t1
join ais_data.yihailan_guakao11 t2 on t1.mmsi=t2.mmsi
where from_unixtime(cast(t2.utc1 as bigint),'yyyy-MM-dd HH:mm:ss')<='2019-11-21 15:24:50'
and from_unixtime(cast(t2.utc1 as bigint),'yyyy-MM-dd HH:mm:ss')>= from_unixtime(cast(unix_timestamp(t1.planarrivedtime) as bigint)-24*60*60,'yyyy-MM-dd HH:mm:ss')
and from_unixtime(cast(t2.utc1 as bigint),'yyyy-MM-dd HH:mm:ss')<= from_unixtime(cast(unix_timestamp(t1.planarrivedtime) as bigint)+24*60*60,'yyyy-MM-dd HH:mm:ss');
当我执行select语句时,我可以得到正确的结果,但是当我在select语句之前添加create table语句时,发生了错误
[40000] [42000]:编译语句时出错:Failed: SemanticException Line 0:-1 遇到的左右别名 加入''yyyy-MM-dd HH:mm:ss''
它在上周之前有效,上周我发现了这个错误。
有什么帮助吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)