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

Home -> Community -> Usenet -> comp.databases.oracle -> Re: Help on Oracle Update statement

Re: Help on Oracle Update statement

From: Chris Leonard <s_p_a_m_chris_at_hotmail.com>
Date: Thu, 29 Apr 2004 16:40:58 -0500
Message-ID: <LDekc.43$2b2.34332@news.uswest.net>


Don,

Try something like this:

UPDATE TABLE1
SET FIELD1 =
   (SELECT FIELD2 FROM TABLE2
    WHERE TABLE2.FIELD2 = TABLE2.FIELD1) ...

-- 
Cheers,
Chris

___________________________________

Chris Leonard, The Database Guy
http://www.databaseguy.com

Brainbench MVP for Oracle Admin
http://www.brainbench.com

MCSE, MCDBA, OCP, CIW
___________________________________

"Don" <don_leeNO_aa_SPAM_at_telus.net> wrote in message
news:q0j290t74eannlodc70rn7ffenafudnpu8_at_4ax.com...

> Hi,
>
> I am moving from Sybase to Oracle and I used to be able to do update
> statement like this in Sybase:
>
> UPDATE TABLE1
> SET T1.field1 = T2.field2
> FROM TABLE1 T1, TABLE2 T2
> WHERE T1.field2 = T2.field2
> AND ....
>
> but in Oracle it is not valid. Does anyone know how to convert it to
> Oracle?
>
> Thanks in advance..
>
>
>
Received on Thu Apr 29 2004 - 16:40:58 CDT

Original text of this message

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