How to update a View?

Asked

Viewed 733 times

0

I have a table where you store trucks in and out. In this table there are two fields of the type Date, I want to update the data of these fields. I’m using the select below.

  UPDATE V_TPL_ACOMPANHAMENTO SET E_POR = TO_DATE('08/10/18 22:24','DD/MM/YY HH24:MI'), 
  S_PORT = TO_DATE('09/10/18 01:55','DD/MM/YY HH24:MI') WHERE COLETA='EDB-TP-32764C'

But when I try to update, the error message appears: ORA-01732: data Manipulation Operation not legal on this view

1 answer

1


Cause: An attempt was made to use an UPDATE, INSERT or DELETE statement in a view that contains expressions or functions or was derived from more than one table. If a merge operation has been used to create the display or the display contains virtual columns derived from functions or expressions, the display can only be consulted. Source oracle documentation.

  • http://www.linhadecodigo.com.br/artigo/2821/trigger-oracle-basico.aspx try a INSTEAD OF TRIGGER

Browser other questions tagged

You are not signed in. Login or sign up in order to post.