Possible Duplicate:
How to UPDATE one column using another column in another table? SQL Error: ORA-00933: SQL command not properly ended
I have tried everything I can think of but couldn't solve this SQL error:
SQL Error: ORA-00933: SQL command not properly ended
This is Oracle SQL.
Have to say, Oracle SQL seems a lot more awkward and hard to use than the open-source version MySQL.... Many thanks.
UPDATE SALES_DATA_FAMILY_2007 A
SET A.POG_ID=B.POG_ID
FROM POG_HIERARCHY B
WHERE A.FAMILY_ID=B.FAMILY
;
Oracle doesn't support
UPDATE FROM
syntax - or didn't last time I looked.Here is the
BNF
:(from: http://docs.oracle.com/html/A95915_01/sqcmd.htm)
If you want to set all values of
A.POG_ID
, you can use this syntax:Or PL/SQL, just to update the rows in
sales_data_family_2007
which are applicable: