Hive中的嵌套查询不起作用:ParesException

时间:2017-01-25 20:49:10

标签: sql database hadoop hive hiveql

我希望整个查询针对where子句中的子查询返回的每个值运行。我无法弄清楚我在这里做错了什么。请帮忙?

SELECT a.*, b.*, c.* 
FROM table1 a, table2 b, table3 c
WHERE a.val1 = ( select val1 from table1 )
AND a.val2 = b.val3
AND a.val4 = c.val5;

1 个答案:

答案 0 :(得分:0)

in代替=

SELECT a.*, b.*, c.* 
FROM table1 a, table2 b, table3 c
WHERE a.val1 in ( select val1 from table1 )
AND a.val2 = b.val3
AND a.val4 = c.val5;