我想在我的hive表中插入一个count(*)的结果:
hive -e "use eapi;INSERT into searchresults 'ANZHAUS_GES','Null',(select count(*) from adpubsdmdata WHERE ANZHAUS_GES>=0 && ANZHAUS_GES<=0);"
我得到结果:
在表名
附近的搜索结果中缺少表格
我做错了什么?
答案 0 :(得分:0)
您需要将其格式化为子查询:
hive -e "use eapi;INSERT into searchresults 'ANZHAUS_GES','Null', q.count from (select count(*) as count from adpubsdmdata WHERE ANZHAUS_GES>=0 && ANZHAUS_GES<=0)q;"