update bpm_biz b set dealer_memo = (select e.ASSIGN_MEMO  from BPM_TASK t ,BPM_TASK_EXT e where t.TASK_ID = e.TASK_ID and b.INST_ID = t.INST_D and rownum=1  and t.PRE_TASKNAME = 'XXXXX'  and t.TASK_NAME = 'XXXXX'   order by t.ASSIGN_TIME desc )where exists (select 1  from BPM_TASK t ,BPM_TASK_EXT e where t.TASK_ID = e.TASK_ID and b.INST_ID = t.INST_D and rownum=1  and t.PRE_TASKNAME = 'XXXXX'  and t.TASK_NAME = 'XXXXX'   order by t.ASSIGN_TIME desc )

 

 

原因:这种语句测试时会报“缺少右括号”

 

解决方案:order by 尽量用 group by 代替,尽管性能慢一些

 posted on 2015-11-13 14:49  细蚊仔C  阅读(736)  评论(0编辑  收藏  举报