当前位置: 代码迷 >> Oracle管理 >> SQL实施出错
  详细解决方案

SQL实施出错

热度:80   发布时间:2016-04-24 04:33:24.0
SQL执行出错
我想更新tmp_final表的dept_code_9字段,根据tmp_huiduishuju表的dept_code_9字段值,但是系统报错:命令未正确结束,求解:
update tmp_final
set tmp_final.dept_code_9=tmp_huiduishuju.dept_code_9
where tmp_final.dept_code_8=tmp_huiduishuju.dept_code_8

------解决方案--------------------

update tmp_final
set tmp_final.dept_code_9=(select tmp_huiduishuju.dept_code_9
from tmp_huiduishuju
where tmp_final.dept_code_8=tmp_huiduishuju.dept_code_8)


你都没有检索tmp_huiduishuju这个表对象,肯定会报错的。。。。
  相关解决方案