SQL命令未正确结束错误

时间:2017-05-26 06:33:11

标签: sql oracle dml

我收到的错误是“SQL命令未正确结束”。在尝试运行此查询时。有人可以帮我认识一下这是什么问题。

UPDATE PM_ACTION_CALENDAR_PLAN_TAB 
   SET t1.GEN_DATE = t2.GEN_DATE 
  FROM PM_ACTION_CALENDAR_PLAN_TAB t1 
       INNER JOIN  GEN_DATEPREPARE2 t2 
         ON t1.PM_NO = t2.PM_NO AND 
            t1.SEQ_NO=t2.SEQ_NO AND 
            t1.PM_REVISION=t2.PM_REVISION;

1 个答案:

答案 0 :(得分:1)

试试这个

  UPDATE PM_ACTION_CALENDAR_PLAN_TAB  t1
       SET t1.GEN_DATE = (select t2.GEN_DATE 
                            from GEN_DATEPREPARE2 t2 
                           where t2.PM_NO = t1.PM_NO 
                             AND t2.SEQ_NO = t1.SEQ_NO 
                             AND t2.PM_REVISION = t1.PM_REVISION)