为什么我收到错误消息?
ORA-01427: 单行子查询使用此查询返回多行
UPDATE JOB_TASK JT1
SET JT1.job_task_status_id =
(SELECT JTS1.JOB_TASK_STATUS_ID
FROM MAXIMO_WO MW1
INNER JOIN job_task_status jts1
ON MW1.STATUS = jts1.description
INNER JOIN JOB_TASK JT1
ON jt1.job_task_id = mw1.wonum)
WHERE JT1.JOB_TASK_STATUS_ID IN
(SELECT JTS.JOB_TASK_STATUS_ID
FROM JOB_TASK_STATUS JTS,
JOB_TASK JT,
MAXIMO_WO MW,
WORK_ORDER_CONTROL WOC
WHERE JT.JOB_TASK_ID = MW.WONUM
AND JT.JOB_TASK_STATUS_ID = JTS.JOB_TASK_STATUS_ID
AND JT.WORK_ORDER_ID = WOC.WORK_ORDER_ID
and jt.job_task_id = mw.wonum
AND MW.STATUS IN
('APPR',
'SCHED',
'INPRG',
'FNACCEPT',
'WMATL',
'WKCOMP',
'COMP')
AND WOC.COMPANY_ID = '21'
AND MW.SITEID <> 'NUCDEV'
AND DECODE (
INSTR (JTS.DESCRIPTION, '-', 1),
0, JTS.DESCRIPTION,
SUBSTR (JTS.DESCRIPTION,
1,
(INSTR (JTS.DESCRIPTION, '-', 1) - 1))) <>
MW.STATUS
AND JT.LEVEL_NUMBER = '3'
AND MW.STATUSDATE < SYSDATE - 1
AND MW.WONUM <> 'UNDEFINED')