【发布时间】:2016-09-26 20:19:20
【问题描述】:
有没有办法在 HiveQL 中执行下面的 Sql 查询?
select * from my_table
where (a,b,c) not in (x,y,z)
其中a,b,c分别对应x,y,z
谢谢:)
【问题讨论】:
-
这个结构是什么意思?样本数据和期望的结果非常有帮助。
有没有办法在 HiveQL 中执行下面的 Sql 查询?
select * from my_table
where (a,b,c) not in (x,y,z)
其中a,b,c分别对应x,y,z
谢谢:)
【问题讨论】:
您必须将这些分解为单独的条件:
SELECT *
FROM my_table
WHERE a != x AND b != y AND c != z
【讨论】:
这是你想要的吗?
where a <> x or b <> y or c <> z
还是这个?
where a not in (x, y, z) and
b not in (x, y, z) and
c not in (x, y, z)
或者其他一些变化?
【讨论】: