The UPDATE table FROM syntax is not supported by Oracle.
I am looking for a syntax that is understood by both Oracle and SqlServer.
Example:
Table1:
id name city city_id
1 john newyork null
2 peter london null
3 hans newyork null
Table2:
id city
23 london
24 paris
25 newyork
UPDATE table1
SET city_id = table2.id
FROM table1, table2
WHERE table1.city = Table2.city
If possible I do not want to have two different statements for Oracle and
SqlServer
Please do not tell me that these tables are not normalized, it's just an
example!
Thanks for any hints.
Jan van Veldhuizen