update A set 学历=(select MAX(文化程度) from B where 学校 is not null and 培训形式='脱产' group by id ) where A.ID=B.ID
update A set 学历=(select MAX(文化程度) from B where 学校 is not null and 培训形式='脱产' group by id ) where A.ID=B.ID
update A set 学历=(select whcd from (select max(文化程度) whcd from B where length(学校)>0 group by ID) e where e.id=A.id) where (select count(*) from (select max(文化程度) whcd from B where length(学校)>0 group by ID) e where e.id=A.id)>0看看这样可不可以?我到时没有试过,思路应该是这样但是我可以肯定,上面的SQL Statement绝对错的很远
学历=(select whcd from (select max(文化程度) whcd from B where length(学校)>0 group by ID) e where e.id=A.id)
where (select count(*) from (select max(文化程度) whcd from B where length(学校)>0 group by ID) e where e.id=A.id)>0看看这样可不可以?我到时没有试过,思路应该是这样但是我可以肯定,上面的SQL Statement绝对错的很远
谢谢各位了
给分了