问题:mismatched input 'as' expecting <EOF>(line 24, pos 13)
group by concat(from_unixtime(unix_timestamp(odr.pt,'yyyyMMdd'),'yyyy-MM-dd'),' 00:00:00'),
nvl(dc.province_id, -99),
CASE
WHEN dc.province_name is null THEN nvl(dc.province_name, '未知')
WHEN dc.province_name = '' THEN '未知'
END as province_name,
-------------^^^
解决方法:去掉group by 语句后面的 as关键字
问题:字段为空null或""的处理方法
字符类型空字符分null和"",null通过is null进行判断,
""通过length()=0判断
网友评论