日期:2014-05-17  浏览次数:20436 次

SQL小白求教
大哥大姐们看看我这段 为啥总是无法执行?感觉没问题啊?我是小白
select x.uid,x.appid,y.appname
from ods_bas_user_download_android_appall x,
ods_bas_android_app_info y
where x.appid=y.appid
and x.dt='20131212'
and x.refresh_date>='20131111'
and x.is_active='1'

------解决方案--------------------
引用:
是啊 报错了 如下


是hive查询啊。

改成这样试试:
select x.uid,x.appid,y.appname
from ods_bas_user_download_android_appall x
left join ods_bas_android_app_info y
       on x.appid=y.appid
where  x.dt='20131212'
and x.refresh_date>='20131111'
and x.is_active='1'

------解决方案--------------------
你的原语句和我5楼的是等价的,不过和left join大部分情况不等价