0

I use this syntax in PL-SQL,But it not works.hints 'SQL COMMAND IS NOT ended correctly.'

UPDATE product.up_item_shelf a 
  SET a.del_flag=b.del_falg,a.eff_date=b.eff_date,a.exp_date=b.exp_date 
  FROM product.up_item_shelf 
a JOIN product.up_item_shelf b 
  ON substr(a.shelf_id,5,8)=substr(b.shelf_id,5,8) 
AND a.product_item_id=b.product_item_id AND b.channel_id=6 AND a.channel_id=39
Kaushik Nayak
  • 30,772
  • 5
  • 32
  • 45
  • You are using the syntax from [PostgreSQL UPDATE](https://www.postgresql.org/docs/9.1/static/sql-update.html), this will not work on Oracle because FROM clause is non standard extension, you need use [Oracle UPDATE syntax](https://docs.oracle.com/database/121/SQLRF/statements_10008.htm#SQLRF01708) – krokodilko Jun 07 '18 at 03:54
  • 3
    Duplicate of [Update statement with inner join on Oracle](https://stackoverflow.com/questions/2446764/update-statement-with-inner-join-on-oracle) – Kaushik Nayak Jun 07 '18 at 03:54

0 Answers0