1

When I try to execute the script below on sql developer I've got this exception :

  1. 00000 - "SQL command not properly ended"
UPDATE T1 SET T1.IDC= T2.IDC
FROM T1
JOIN T2 ON (T1.IDC=T2.IDO);

I don't get what's wrong with my script. Can Anyone help please?

jarlh
  • 42,561
  • 8
  • 45
  • 63
jane Doe
  • 137
  • 2
  • 2
  • 9

1 Answers1

1

In Oracle you do not have the JOIN clause in the UPDATE statement. You can use the following: UPDATE T1 SET T1.IDC = (SELECT T2.IDC from T2 WHERE T2.IDO = T1.IDC) Add the WHERE clause if you do not want to update the entire table.

Sebz
  • 492
  • 2
  • 4