Re: Please Help with SQL Statement

From: Mike Kohut, NorthwesTel <mkohutnw_at_yknet.yk.ca>
Date: 1995/06/28
Message-ID: <3sqdtt$h68_at_spot.YKnet.yk.ca>#1/1


neuwirth_at_nmti.com (Howard Neuwirth-Hirsch) wrote:
> update FINALDAT set bias= (select CONST from LINEAR,RAWDATA,FINALDAT
> where (FINALDAT.NAME = RAWDATA.UID and LINEAR.ENTRY_NO = RAWDATA.CHAR_NO));
> the result of this is:
> ERROR at line 1:
> ORA-01427: single-row subquery returns more than one row
>

I believe that your mistake was to include the FINALDAT table in the sub-query. Try this instead:

update FINALDAT F
set f.bias =

    (select L.CONST

     from   LINEAR L, RAWDATA R
     where  (F.NAME = R.UID and L.ENTRY_NO = R.CHAR_NO));
Received on Wed Jun 28 1995 - 00:00:00 CEST

Original text of this message