Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How can I avoid the "Single row subquery returns more than one row" message
Andy schrieb:
> Hi,
>
> I am trying to do a simple (hopefully) join between 2 tables and
> use a column in table 2 to update table 1. The problem is that
> my subquery is returning multiple rows. Is there a way to force
> the first match to be used by default to avoid the "multiple
> rows" situation, or any other way around this problem?
> Hope this makes sense...the query that is having the problem is
> here:
>
> Update Frt.Mpay_working a
> Set shipper_city =
> (Select b.city from Frt.cities b
> where a.shipfrom = b.shipto
and where rownum = 1
> );
>
> Thanks alot for your help...appreciate it!
> Andy
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
-- --------------------------------------------------------------- Dipl.-Inf. (FH) Stephan Born | beusen Consulting GmbH fon: +49 30 549932-0 | Landsberger Allee 392 fax: +49 30 549932-21 | 12681 Berlin mailto:stephan.born_at_beusen.de | Germany --------------------------------------------------------------- PGP-Key verfügbar | PGP-Key available ---------------------------------------------------------------Received on Mon Apr 10 2000 - 00:00:00 CDT
![]() |
![]() |