日期:2014-05-19  浏览次数:20557 次

/高手们帮我改一下这个sql语句
select   top   30   jobs.id,jobs.comid,jobs,dysp,s_WorkLocation,c_WorkLocation,citycn,renshu,jobs.degree,tjsj,jobs.zt,jobs.sex,corporation.id,corporation.qymc   from   rencai.dbo.jobs   ,   sh.dbo.corporation       where   (len(selectedjob)> 1   and   len(jobs)> 1   and   zt <> 1)   and   sh.dbo.corporation.id=rencai.dbo.jobs.comid       and   jobs.id   not   in(select   top   5   jobs.id   from   rencai.dbo.jobs   where   (len(selectedjob)> 1   and   len(jobs)> 1   and   zt <> 1)   and   sh.dbo.corporation.id=jobs.comid       order   by   tjsj   desc)   order   by   tjsj   desc
....................................
出错提示
列前缀   'corporation '   与查询中所用的表名或别名不匹配。列前缀   'corporation '   与查询中所用的表名或别名不匹配

------解决方案--------------------
把corporation.id,corporation.qymc
改成sh.dbo.corporation.id,sh.dbo.corporation.qymc试试
------解决方案--------------------
太乱了;
使用别名试试