0

I am clue less about this syntax which is working fine in MS Access

UPDATE (Table1 INNER JOIN Table2 ON (Table1.IDENT = Table2.IDENT) AND (Table1.AREA = Table2.AREA)) 
INNER JOIN Table3 ON (Table2.IDENT = Table3.IDENT) AND (Table2.AREA = Table3.AREA) 
SET Table3.ELEV = Table2.elev, Table3.NAME = Table2.name, Table3.CYCLE = "1807";

I am looking for Oracle equivalent of this.

addcolor
  • 455
  • 8
  • 23
  • 2
    Possible duplicate of [Update statement with inner join on Oracle](https://stackoverflow.com/questions/2446764/update-statement-with-inner-join-on-oracle) – Rene Nov 29 '18 at 03:39
  • Negative, In this query UPDATE's target is an uknown alias. SET statement is on actual table. That is causing confusion, – addcolor Nov 29 '18 at 04:08
  • Plus, I do not see any SELECT in this version of query – addcolor Nov 29 '18 at 04:09
  • Did you read the other link properly? – Rene Nov 29 '18 at 06:10

1 Answers1

1

Something like this, perhaps?

UPDATE table3 t3
   SET (t3.elev, t3.name, t3.cycle) =
          (SELECT t2.elev, t2.name, '1807'
             FROM table2 t2
                  JOIN table1 t1
                     ON     t1.ident = t2.ident
                        AND t1.area = t2.area
            WHERE     t2.ident = t3.ident
                  AND t2.area = t3.area);
Littlefoot
  • 131,892
  • 15
  • 35
  • 57