Re: Update SQL problem

From: Richard Ramirez <ou79138_at_deere.com>
Date: 1996/01/24
Message-ID: <DLpAF6.Lt1_at_deere.com>#1/1


pyates_at_melb.cpr.itg.telecom.com.au (Peter Yates) wrote:
>Hi
>
>I'm doing an update to a table using a sub-query and get
>ORA-01427 single-row subquery returns more than one row.
>How do I get around this?
>
>update table1
>set day=sysdate
>where table1.id = (select id from table2 where field2 like
>'BLAH');
>
>The select returns more than one row so the update fails.
> Thankx in advance

Use EXISTS.

Richard Received on Wed Jan 24 1996 - 00:00:00 CET

Original text of this message