Home » RDBMS Server » Server Administration » ACCESS UPDATE != Oracle UPDATE ????
ACCESS UPDATE != Oracle UPDATE ???? [message #373480] Wed, 18 April 2001 17:59 Go to next message
aspy
Messages: 2
Registered: April 2001
Junior Member
Please give me help on that...!

I have the following Access SQL Statement that I want to be working into Oracle:

UPDATE table1
LEFT JOIN table2
ON (table1.field1 = table2.field1)
AND (table1.field2 = table2.field2)
SET table1.key_field = table2.key_field;

My problem is that Oracle (with the proper Oracle SQL syntax) seem not to accept the FROM clause in the SET and that if I do a subquery, it returns multiple rows from the join so it's not good :-(

THX !
Re: ACCESS UPDATE != Oracle UPDATE ???? [message #373490 is a reply to message #373480] Thu, 19 April 2001 08:20 Go to previous message
Bala
Messages: 205
Registered: November 1999
Senior Member
Hi,

With outer join in sub select you can do this
like

UPDATE table1 set
table1.key_field = ( select table2.key_field
from table2 where table1.field1 (+) = table2.field1
and table1.field2 = table2.field2)

should do it..

Bala.
Previous Topic: SQL
Next Topic: Re: starting a script from Delphi client application
Goto Forum:
  


Current Time: Mon Jul 01 16:10:53 CDT 2024