Re: Single Row Subquery Returns More Than One Row

From: Kevin <matthewske_at_MCCDC.usmc.mil>
Date: 22 Oct 2001 07:25:03 -0700
Message-ID: <69fcd0b1.0110220625.6b02b319_at_posting.google.com>


kgao_at_iname.com (Kevin Gao) wrote in message news:<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
> );

Thanks alot this worked perfectly! Received on Mon Oct 22 2001 - 16:25:03 CEST

Original text of this message