Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: simple sql question

Re: simple sql question

From: LJS <ljstra_at_delicatech.com>
Date: Fri, 08 Jan 1999 12:31:36 -0600
Message-ID: <36964F08.D0600007@delicatech.com>


TurkBear's solution won't work because the subquery returns more than a single row.

TurkBear wrote:

> Try
> Update table_a set f1 = (select f1 from table_b where table_a.f2 = table_b.f2
> and table_a.f1 <> table_b.f1);
>
> susana73_at_hotmail.com wrote:
>
> >I am an ingres developer and new in oracle. I have the following simple
> >Ingres SQL and am wondering how to change it to SQL in Oracle. Thanks!
> >
> >UPDATE table_a a
> >FROM table_b b
> >SET f1 = b.f1
> >WHERE a.f2 = b.f2
> >AND a.f1 != b.f1;
> >
> >Susan
> >
> >-----------== Posted via Deja News, The Discussion Network ==----------
> >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
> To reply please remove the 'nospam' part of the address
Received on Fri Jan 08 1999 - 12:31:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US