日期:2014-05-18  浏览次数:20390 次

更新字段出错
update employee set employee.educationid=k.educationid
from (select employeeid ,educationid c ,max(beginenddate_enddate) from Employeeeducation
where educationid is not null
group by employeeid,educationid ,[name])k
where k.employeeid=employee.employeeid

------解决方案--------------------
from (select employeeid ,educationid c ,max(beginenddate_enddate) as col from Employeeeducation

------解决方案--------------------
探讨

引用:

注意子查询的别名问题。

你确实是解决问题了,为什么要加这个,我用2000的时候没有这个问题呀,用2008有这个问题
as col 是给哪个取别名