栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

hive中使用order by时发现的小问题:Line 3:9 Invalid table alias or column reference ‘history

hive中使用order by时发现的小问题:Line 3:9 Invalid table alias or column reference ‘history

执行的sql:

select learning_position_id,learning_path_id
from position_course_sort
order by history_sort,recommend_sort,hot_sort

报错信息:

FAILED: SemanticException [Error 10004]: Line 3:9 Invalid table alias or column reference 'history_sort': (possible column names are: learning_position_id, learning_path_id)

报错原因:
select 后面的字段必须包含order by后面的所有字段,不然就会报上面的错误

解决办法:
select 后除了加上需要查询的字段之外,还要再加上order by 后面跟的字段

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/662924.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号