Re: Please Help with SQL Statement
Date: 1995/07/01
Message-ID: <3t4fk7$ofe_at_usenet.INS.CWRU.Edu>#1/1
In article <3sqdtt$h68_at_spot.YKnet.yk.ca>, "Mike Kohut, NorthwesTel" <mkohutnw_at_yknet.yk.ca> says:
>
>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));
>
>
I don't think it is going to help, your subquery will still return more than one row.
Just ask yourself a question: Are there more than one row for condition:
F.NAME = R.UID and L.ENTRY_NO = R.CHAR_NO?
The answer is: Yes in general. Obviously, you need to specify a condition,
providing a single return.
Received on Sat Jul 01 1995 - 00:00:00 CEST