爬坑:hive的NULL值过滤

hive的底层保存的是’NULL’是个字符串,想要过滤掉NULL值,使用is not null无效

insert overwrite local directory '/home/hadoop/zoujc/result'
select distinct username
from
xxxtable
where lower(password) != 'abnormal' 
and password != '' and password != 'NULL' and password != 'null'
and to_date(LastLoginTime) >= '2017-10-14' and to_date(LastLoginTime) <= '2018-04-14'
order by username

猜你喜欢

转载自blog.csdn.net/weixin_38799368/article/details/83078483