I'm getting the error " SQL Error: ORA-01427: single-row subquery returns more than one row " in this query
UPDATE IN_DOC_HDR INDOC
SET INDOC.DOC_CLSD_DT = (
SELECT PRHDR.DOC_CLSD_DT
FROM PR_DOC_HDR PRHDR
, PR_DOC_COMM PRCOMM
WHERE INDOC.DOC_ACTU_AM <> 0
AND INDOC.DOC_ACTU_AM <> INDOC.DOC_CLSD_AM
AND PRCOMM.IN_DOC_CD = INDOC.DOC_CD
AND PRCOMM.IN_DOC_DEPT_CD = INDOC.DOC_DEPT_CD
AND PRCOMM.IN_DOC_ID = INDOC.DOC_ID
AND PRCOMM.DOC_PHASE_CD = 3
AND PRHDR.DOC_CD = PRCOMM.DOC_CD
AND PRHDR.DOC_DEPT_CD = PRCOMM.DOC_DEPT_CD
AND PRHDR.DOC_ID = PRCOMM.DOC_ID
)
WHERE EXISTS (
SELECT 1
FROM IN_DOC_HDR INDOC
, PR_DOC_COMM PRCOMM
, PR_DOC_HDR PRHDR
WHERE INDOC.DOC_ACTU_AM <> INDOC.DOC_CLSD_AM
AND INDOC.DOC_ACTU_AM <> 0
AND PRCOMM.IN_DOC_CD = INDOC.DOC_CD
AND PRCOMM.IN_DOC_DEPT_CD = INDOC.DOC_DEPT_CD
AND PRCOMM.IN_DOC_ID = INDOC.DOC_ID
AND PRCOMM.DOC_PHASE_CD = 3
AND PRHDR.DOC_CD = PRCOMM.DOC_CD
AND PRHDR.DOC_DEPT_CD = PRCOMM.DOC_DEPT_CD
AND PRHDR.DOC_ID = PRCOMM.DOC_ID
)