Re: Single Row Subquery Returns More Than One Row
From: Kevin Gao <kgao_at_iname.com>
Date: 19 Oct 2001 10:48:43 -0700
Message-ID: <27f584d1.0110190948.5cc113b3_at_posting.google.com>
Date: 19 Oct 2001 10:48:43 -0700
Message-ID: <27f584d1.0110190948.5cc113b3_at_posting.google.com>
When you're updating using subquery, the subquery MUST return only one
row. Otherwise you get this error message. Based on your query, it can
be modified to a correlated query:
UPDATE TBLEWC_TASK_INSTANCE B
SET TASK_INSTANCE_ID =
(
SELECT A.TASK_INSTANCE_ID
FROM TBLTASK_INSTANCE A
WHERE A.TASK_ID IS NULL
AND B.TASK_INSTANCE_ID IS NULL
AND A.EWC_INSTANCE_ID = B.EWC_INSTANCE_ID
);
Received on Fri Oct 19 2001 - 19:48:43 CEST