您的位置:首页 > 产品设计 > UI/UE

SemanticException Column xx Found in more than One Tables/Subqueries

2015-07-01 18:54 1311 查看
执行hiveql时报错:
SemanticException Column xx Found in more than One Tables/Subqueries
Hive中有两张表中拥有同一个字段名称,在这两个表做关联的时候会报这个错误




将其中一个表的重复字段加上别名,然后进行关联查询
select city.city, hotel.hotel, hotel.hotelname from city city,
(select city as hcity ,hotel , hotelname from hotel) hotel
where city.city = hotel.hcity
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  hive SemanticExcept